forked from MagicBane/Server
attempt to stop second box crash
This commit is contained in:
@@ -5180,24 +5180,26 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
this.updateBlessingMessage();
|
this.updateBlessingMessage();
|
||||||
|
|
||||||
this.safeZone = this.isInSafeZone();
|
this.safeZone = this.isInSafeZone();
|
||||||
if (!this.timestamps.containsKey("nextBoxCheck"))
|
|
||||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
|
||||||
|
|
||||||
if (!this.isBoxed && this.timestamps.get("nextBoxCheck") < System.currentTimeMillis()) {
|
if(this.isActive && this.enteredWorld) {
|
||||||
this.isBoxed = checkIfBoxed(this);
|
if (!this.timestamps.containsKey("nextBoxCheck"))
|
||||||
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
||||||
}
|
|
||||||
|
|
||||||
if (this.level < 10 && this.enteredWorld) {
|
if (!this.isBoxed && this.timestamps.get("nextBoxCheck") < System.currentTimeMillis()) {
|
||||||
while (this.level < 10) {
|
this.isBoxed = checkIfBoxed(this);
|
||||||
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
this.timestamps.put("nextBoxCheck", System.currentTimeMillis() + 10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.level < 10 && this.enteredWorld) {
|
||||||
|
while (this.level < 10) {
|
||||||
|
grantXP(Experience.getBaseExperience(this.level + 1) - this.exp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.isBoxed && !this.containsEffect(1672601862)) {
|
||||||
|
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.isBoxed && !this.containsEffect(1672601862)) {
|
|
||||||
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isFlying()) {
|
if (this.isFlying()) {
|
||||||
if (this.effects.containsKey("MoveBuff")) {
|
if (this.effects.containsKey("MoveBuff")) {
|
||||||
GroundPlayer(this);
|
GroundPlayer(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user