Fix Jump and Run behaviour on LobbyPacket
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
3f792cb367
Commit
65914a4d54
@ -19,11 +19,13 @@
|
||||
|
||||
package de.steamwar.lobby;
|
||||
|
||||
import de.steamwar.lobby.jumpandrun.JumpAndRun;
|
||||
import de.steamwar.network.packets.PacketHandler;
|
||||
import de.steamwar.network.packets.common.FightInfoPacket;
|
||||
import de.steamwar.network.packets.server.StartingServerPacket;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
|
||||
import java.util.Objects;
|
||||
@ -37,6 +39,10 @@ public class LobbyPacketHandler extends PacketHandler {
|
||||
|
||||
@Handler
|
||||
public void serverStarting(StartingServerPacket packet) {
|
||||
Objects.requireNonNull(Bukkit.getPlayer(SteamwarUser.get(packet.getUser()).getUUID())).teleport(LobbySystem.config().getWaitingHallSpawn(), PlayerTeleportEvent.TeleportCause.PLUGIN);
|
||||
Player player = Objects.requireNonNull(Bukkit.getPlayer(SteamwarUser.get(packet.getUser()).getUUID()));
|
||||
player.teleport(LobbySystem.config().getWaitingHallSpawn(), PlayerTeleportEvent.TeleportCause.PLUGIN);
|
||||
if (JumpAndRun.isPlayerInJumpAndRun(player)) {
|
||||
JumpAndRun.reset(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class JumpAndRun extends BasicListener {
|
||||
CLICKED.put(event.getPlayer(), System.currentTimeMillis());
|
||||
}
|
||||
|
||||
private void reset(Player player) {
|
||||
public static void reset(Player player) {
|
||||
PlayerSpawn.giveItems(player);
|
||||
player.setAllowFlight(true);
|
||||
CURRENT_POS.remove(player);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren