mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 07:37:43 +00:00
call deregisterRegion appropriately
This commit is contained in:
parent
29bdb7f3f6
commit
44d8a6482e
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user