SteamWar/FightSystem
Archiviert
13
1
Signed-off-by: Yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Yaruma3341 2019-04-20 17:05:31 +02:00
Ursprung c0d19fe75e
Commit b9a26c768f
2 geänderte Dateien mit 8 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -84,7 +84,10 @@ public class FightTeam {
} }
public boolean isPlayerLeader(Player player) { public boolean isPlayerLeader(Player player) {
if(leader != null)
return leader.getPlayer().equals(player); return leader.getPlayer().equals(player);
else
return false;
} }
public void broadcast(String message) { public void broadcast(String message) {

Datei anzeigen

@ -92,6 +92,10 @@ public class WaterRemover {
if (anchor.getType() == Material.STATIONARY_WATER) { if (anchor.getType() == Material.STATIONARY_WATER) {
collected.add(anchor); collected.add(anchor);
} }
if(visitedBlocks.size() > 50) {
collected.clear();
return;
}
this.collectBlocks(anchor.getRelative(BlockFace.UP), collected, visitedBlocks); this.collectBlocks(anchor.getRelative(BlockFace.UP), collected, visitedBlocks);
this.collectBlocks(anchor.getRelative(BlockFace.NORTH), collected, visitedBlocks); this.collectBlocks(anchor.getRelative(BlockFace.NORTH), collected, visitedBlocks);
this.collectBlocks(anchor.getRelative(BlockFace.EAST), collected, visitedBlocks); this.collectBlocks(anchor.getRelative(BlockFace.EAST), collected, visitedBlocks);