From 7189e3701d1aaf9775532fb97a97e76789af0092 Mon Sep 17 00:00:00 2001 From: Melledy <52122272+Melledy@users.noreply.github.com> Date: Thu, 21 Jul 2022 01:06:17 -0700 Subject: [PATCH] Use `getOpenStateMap()` in PlayerOpenStateManager --- .../emu/grasscutter/game/player/PlayerOpenStateManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/player/PlayerOpenStateManager.java b/src/main/java/emu/grasscutter/game/player/PlayerOpenStateManager.java index 8757639f4..554cb892e 100644 --- a/src/main/java/emu/grasscutter/game/player/PlayerOpenStateManager.java +++ b/src/main/java/emu/grasscutter/game/player/PlayerOpenStateManager.java @@ -33,7 +33,7 @@ public class PlayerOpenStateManager extends BasePlayerDataManager { public static final Set DEV_OPEN_STATES = Stream.of(OpenState.values()) .filter(s -> s != OpenState.OPEN_STATE_NONE && s.getUnlockLevel() <= 1) .collect(Collectors.toSet()); - + public PlayerOpenStateManager(Player player) { super(player); } @@ -44,11 +44,11 @@ public class PlayerOpenStateManager extends BasePlayerDataManager { } public int getOpenState(OpenState openState) { - return this.map.getOrDefault(openState.getValue(), 0); + return getOpenStateMap().getOrDefault(openState.getValue(), 0); } public void setOpenState(OpenState openState, Integer value) { - Integer previousValue = this.map.getOrDefault(openState.getValue(),0); + Integer previousValue = getOpenStateMap().getOrDefault(openState.getValue(),0); if (value != previousValue) { this.map.put(openState.getValue(), value); player.getSession().send(new PacketOpenStateChangeNotify(openState.getValue(),value));