mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Use getOpenStateMap() in PlayerOpenStateManager
This commit is contained in:
@@ -44,11 +44,11 @@ public class PlayerOpenStateManager extends BasePlayerDataManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getOpenState(OpenState openState) {
|
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) {
|
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) {
|
if (value != previousValue) {
|
||||||
this.map.put(openState.getValue(), value);
|
this.map.put(openState.getValue(), value);
|
||||||
player.getSession().send(new PacketOpenStateChangeNotify(openState.getValue(),value));
|
player.getSession().send(new PacketOpenStateChangeNotify(openState.getValue(),value));
|
||||||
|
|||||||
Reference in New Issue
Block a user