Fightserverportale
Dieser Commit ist enthalten in:
Ursprung
ecf813c809
Commit
3d7c0810c2
@ -48,7 +48,7 @@ public class Fightserver {
|
||||
Iterator<Map.Entry<String, Fightserver>> it = servers.entrySet().iterator();
|
||||
while(it.hasNext()) {
|
||||
Map.Entry<String, Fightserver> server = it.next();
|
||||
if(timeout.isBefore(server.getValue().lastUpdate)) {
|
||||
if(timeout.isAfter(server.getValue().lastUpdate)) {
|
||||
server.getValue().remove();
|
||||
it.remove();
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
package de.steamwar.lobby.listener;
|
||||
|
||||
import de.steamwar.comms.packets.ImALobbyPacket;
|
||||
import de.steamwar.lobby.LobbySystem;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -34,6 +36,6 @@ public class Join extends BasicListener {
|
||||
player.setGameMode(GameMode.ADVENTURE);
|
||||
player.setWalkSpeed(0.5f);
|
||||
|
||||
new ImALobbyPacket().send(player);
|
||||
Bukkit.getScheduler().runTaskLater(LobbySystem.getPlugin(), () -> new ImALobbyPacket().send(player), 20);
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ public class CommandPortal implements PortalHandler {
|
||||
cmd.append(pieces[i]).append(parts[i+1].substring(1));
|
||||
}
|
||||
|
||||
player.sendMessage("/" + cmd);
|
||||
new ExecuteCommandPacket(player, cmd.toString()).send(player);
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
}
|
||||
|
||||
private void init() {
|
||||
updateText();
|
||||
setServer(null);
|
||||
|
||||
List<FightserverPortal> list = portals.computeIfAbsent(gamemode, mode -> new ArrayList<>());
|
||||
list.add(this);
|
||||
@ -114,8 +114,8 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(Player player, Location from) {
|
||||
handler.handle(player, from);
|
||||
public void handle(Player player, Location from, Location to) {
|
||||
handler.handle(player, from, to);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -139,6 +139,6 @@ public class FightserverPortal implements PortalHandler, Comparable<FightserverP
|
||||
|
||||
@Override
|
||||
public int compareTo(FightserverPortal other) {
|
||||
return other.order - order;
|
||||
return order - other.order;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren