Browse Source

PC null catch

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
230a7460cd
  1. 16
      src/engine/objects/PlayerCharacter.java

16
src/engine/objects/PlayerCharacter.java

@ -4839,19 +4839,23 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4839,19 +4839,23 @@ public class PlayerCharacter extends AbstractCharacter {
}
public static boolean checkIfBoxed(PlayerCharacter player){
for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){
if(!pc.isActive)
try {
for (PlayerCharacter pc : SessionManager.getAllActivePlayers()) {
if (!pc.isActive)
continue;
if(!pc.enteredWorld)
if (!pc.enteredWorld)
continue;
if(pc.equals(player))
if (pc.equals(player))
continue;
if(pc.getClientConnection().machineID.equals(player.getClientConnection().machineID))
if(pc.isBoxed == false)
if (pc.getClientConnection().machineID.equals(player.getClientConnection().machineID))
if (pc.isBoxed == false)
return true;
}
return false;
}catch(Exception e){
return false;
}
}
@Override

Loading…
Cancel
Save