13
0
Dieser Commit ist enthalten in:
Lixfel 2020-11-01 20:19:15 +01:00
Ursprung c85d522dd9
Commit 7159c689ed
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -60,7 +60,6 @@ public class PlayerSetup {
private static void playerJoinsLobby(Player player){ private static void playerJoinsLobby(Player player){
player.setAllowFlight(true); player.setAllowFlight(true);
player.setFlying(false); player.setFlying(false);
player.teleport(Config.SpecSpawn);
player.getInventory().clear(); player.getInventory().clear();
for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) { for(Player currentPlayer : Bukkit.getServer().getOnlinePlayers()) {
if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() != GameMode.SPECTATOR) { if(currentPlayer.getUniqueId() != player.getUniqueId() && currentPlayer.getGameMode() != GameMode.SPECTATOR) {
@ -97,7 +96,6 @@ public class PlayerSetup {
}, 2); }, 2);
player.getInventory().clear(); player.getInventory().clear();
player.teleport(Config.SpecSpawn);
arenaPlayers.add(player); arenaPlayers.add(player);
} }
} }

Datei anzeigen

@ -20,6 +20,7 @@
package de.steamwar.spectatesystem.listener; package de.steamwar.spectatesystem.listener;
import de.steamwar.scoreboard.SWScoreboard; import de.steamwar.scoreboard.SWScoreboard;
import de.steamwar.spectatesystem.Config;
import de.steamwar.spectatesystem.PlayerSetup; import de.steamwar.spectatesystem.PlayerSetup;
import de.steamwar.spectatesystem.SpectateSystem; import de.steamwar.spectatesystem.SpectateSystem;
import de.steamwar.spectatesystem.elements.REntity; import de.steamwar.spectatesystem.elements.REntity;
@ -34,6 +35,7 @@ public class JoinListener extends BasicListener {
public void onJoin(PlayerJoinEvent e){ public void onJoin(PlayerJoinEvent e){
e.setJoinMessage(null); e.setJoinMessage(null);
Player player = e.getPlayer(); Player player = e.getPlayer();
player.teleport(Config.SpecSpawn);
REntity.playerJoins(player); REntity.playerJoins(player);
PlayerSetup.playerJoins(player); PlayerSetup.playerJoins(player);
SWScoreboard.createScoreboard(player, SpectateSystem.getScoreboard()); SWScoreboard.createScoreboard(player, SpectateSystem.getScoreboard());