forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -39,8 +39,8 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
|
||||
public static FightserverPortal findFree(String gamemode) {
|
||||
List<FightserverPortal> list = portals.getOrDefault(gamemode, Collections.emptyList());
|
||||
for(FightserverPortal portal : list) {
|
||||
if(portal.server == null)
|
||||
for (FightserverPortal portal : list) {
|
||||
if (portal.server == null)
|
||||
return portal;
|
||||
}
|
||||
return null;
|
||||
@@ -100,7 +100,7 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
}
|
||||
|
||||
public void updateText() {
|
||||
if(server == null) {
|
||||
if (server == null) {
|
||||
hologram.updateText("§7Neuen Kampf starten");
|
||||
return;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
List<Location> remainingLocations = new ArrayList<>(locations);
|
||||
npcs.removeIf(npc -> {
|
||||
SteamwarUser user = SteamwarUser.get(npc.getUuid());
|
||||
if(remainingPlayers.contains(user)) {
|
||||
if (remainingPlayers.contains(user)) {
|
||||
remainingPlayers.remove(user);
|
||||
remainingLocations.remove(npc.getLocation());
|
||||
return false;
|
||||
@@ -136,8 +136,8 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
}
|
||||
});
|
||||
|
||||
for(SteamwarUser user : remainingPlayers) {
|
||||
if(remainingLocations.isEmpty())
|
||||
for (SteamwarUser user : remainingPlayers) {
|
||||
if (remainingLocations.isEmpty())
|
||||
break;
|
||||
|
||||
npcs.add(new NPC(remainingLocations.remove(0), user.getUUID(), user.getUserName()));
|
||||
|
||||
Reference in New Issue
Block a user