Commit 44d8a648 authored by akatatsu27's avatar akatatsu27
Browse files

call deregisterRegion appropriately

parent 29bdb7f3
......@@ -328,9 +328,11 @@ public class SceneScriptManager {
if (trigger.event == EventType.EVENT_ENTER_REGION) {
EntityRegion region = this.regions.values().stream().filter(p -> p.getConfigId() == params.param1).toList().get(0);
getScene().getPlayers().forEach(p -> p.onEnterRegion(region.getMetaRegion()));
deregisterRegion(region.getMetaRegion());
} else if (trigger.event == EventType.EVENT_LEAVE_REGION) {
EntityRegion region = this.regions.values().stream().filter(p -> p.getConfigId() == params.param1).toList().get(0);
getScene().getPlayers().forEach(p -> p.onLeaveRegion(region.getMetaRegion()));
deregisterRegion(region.getMetaRegion());
}
deregisterTrigger(trigger);
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment