|
|
@ -4929,24 +4929,26 @@ public class PlayerCharacter extends AbstractCharacter { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
public static boolean checkIfBoxed(PlayerCharacter player){ |
|
|
|
public static boolean checkIfBoxed(PlayerCharacter player){ |
|
|
|
try { |
|
|
|
//REMOVE BEFORE LAUNCH -TEMP DISABLE OF BOX LIMIT
|
|
|
|
String machineID = player.getClientConnection().machineID; |
|
|
|
return false; |
|
|
|
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>(); |
|
|
|
//try {
|
|
|
|
for (PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()) { |
|
|
|
// String machineID = player.getClientConnection().machineID;
|
|
|
|
if (!pc.equals(player) && pc.isActive && pc.isEnteredWorld() && pc.getClientConnection().machineID.equals(machineID)) { |
|
|
|
// ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();
|
|
|
|
sameMachine.add(pc); |
|
|
|
// for (PlayerCharacter pc : SessionManager.getAllActivePlayerCharacters()) {
|
|
|
|
} |
|
|
|
// if (!pc.equals(player) && pc.isActive && pc.isEnteredWorld() && pc.getClientConnection().machineID.equals(machineID)) {
|
|
|
|
} |
|
|
|
// sameMachine.add(pc);
|
|
|
|
|
|
|
|
// }
|
|
|
|
boolean boxed = false; |
|
|
|
// }
|
|
|
|
for (PlayerCharacter pc : sameMachine) |
|
|
|
|
|
|
|
if (!pc.isBoxed) |
|
|
|
// boolean boxed = false;
|
|
|
|
boxed = true; |
|
|
|
// for (PlayerCharacter pc : sameMachine)
|
|
|
|
|
|
|
|
// if (!pc.isBoxed)
|
|
|
|
return boxed; |
|
|
|
// boxed = true;
|
|
|
|
}catch(Exception e){ |
|
|
|
|
|
|
|
return false; |
|
|
|
// return boxed;
|
|
|
|
} |
|
|
|
//}catch(Exception e){
|
|
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
//}
|
|
|
|
} |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void updateFlight() { |
|
|
|
public void updateFlight() { |
|
|
|