mirror of
https://github.com/ViaVersion/ViaLegacy.git
synced 2024-12-22 16:38:16 +01:00
parent
a7984797d9
commit
c87ec975bd
@ -83,14 +83,12 @@ public class ClassicOpLevelStorage extends StoredObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setOpLevel(final byte opLevel) {
|
public void setOpLevel(final byte opLevel) {
|
||||||
final boolean changed = this.opLevel != opLevel;
|
|
||||||
this.opLevel = opLevel;
|
this.opLevel = opLevel;
|
||||||
|
|
||||||
if (this.haxEnabled) {
|
if (this.haxEnabled) {
|
||||||
final ClassicServerTitleStorage serverTitleStorage = this.getUser().get(ClassicServerTitleStorage.class);
|
final ClassicServerTitleStorage serverTitleStorage = this.getUser().get(ClassicServerTitleStorage.class);
|
||||||
this.updateHax(serverTitleStorage.isFlyEffectivelyEnabled(), serverTitleStorage.isNoclipEffectivelyEnabled(), serverTitleStorage.isSpeedEffectivelyEnabled(), serverTitleStorage.isRespawnEffectivelyEnabled());
|
if (serverTitleStorage != null) { // Some servers update the op level before sending the login packet. Just ignore that because the op level is resent in the login packet.
|
||||||
if (changed) {
|
this.updateHax(serverTitleStorage.isFlyEffectivelyEnabled(), serverTitleStorage.isNoclipEffectivelyEnabled(), serverTitleStorage.isSpeedEffectivelyEnabled(), serverTitleStorage.isRespawnEffectivelyEnabled());
|
||||||
this.updateAbilities();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user