mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-12-24 18:17:39 +01:00
Fix CME when players 'cheat'
This commit is contained in:
parent
5104c975fd
commit
6fc59c9321
@ -5,6 +5,7 @@ import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@ -155,8 +156,8 @@ public class MAUtils
|
||||
|
||||
/* Iterate through the ArrayList, and update current and result every
|
||||
* time a squared distance smaller than current is found. */
|
||||
//for (Player p : arena.livePlayers)
|
||||
for (Player p : arena.getPlayersInArena()) {
|
||||
List<Player> players = new ArrayList<Player>(arena.getPlayersInArena());
|
||||
for (Player p : players) {
|
||||
if (!arena.getWorld().equals(p.getWorld())) {
|
||||
Messenger.info("Player '" + p.getName() + "' is not in the right world. Kicking...");
|
||||
p.kickPlayer("[MobArena] Cheater! (Warped out of the arena world.)");
|
||||
|
Loading…
Reference in New Issue
Block a user