Fix player pausing

This commit is contained in:
KingRainbow44
2023-05-18 02:54:47 -04:00
parent bb693cd222
commit 8438e94c6e
4 changed files with 43 additions and 18 deletions

View File

@@ -771,7 +771,7 @@ public class Player implements PlayerHook {
}
public void setPaused(boolean newPauseState) {
boolean oldPauseState = this.paused;
var oldPauseState = this.paused;
this.paused = newPauseState;
if (newPauseState && !oldPauseState) {
@@ -1498,8 +1498,10 @@ public class Player implements PlayerHook {
PropChangeReason.PROP_CHANGE_REASON_PLAYER_ADD_EXP));
case PROP_PLAYER_LEVEL -> this.sendPacket(new PacketPlayerPropChangeReasonNotify(this, prop, currentValue, value,
PropChangeReason.PROP_CHANGE_REASON_LEVELUP));
case PROP_PLAYER_WORLD_LEVEL -> this.sendPacket(new PacketPlayerPropChangeReasonNotify(this, prop, currentValue, value,
PropChangeReason.PROP_CHANGE_REASON_MANUAL_ADJUST_WORLD_LEVEL));
// TODO: Handle world level changing.
// case PROP_PLAYER_WORLD_LEVEL -> this.sendPacket(new PacketPlayerPropChangeReasonNotify(this, prop, currentValue, value,
// PropChangeReason.PROP_CHANGE_REASON_MANUAL_ADJUST_WORLD_LEVEL));
}
// Update player with packet.