13
0

forceResourcepack #14

Manuell gemergt
YoyoNow hat 1 Commits von forceResourcepack nach master 2021-03-21 13:57:12 +01:00 zusammengeführt

Datei anzeigen

@ -31,6 +31,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
public class JoinListener extends BasicListener {
@ -51,6 +52,7 @@ public class JoinListener extends BasicListener {
e.setJoinMessage(null);
Player player = e.getPlayer();
player.setResourcePack("https://steamwar.de/antixray.zip");
player.teleport(Config.SpecSpawn);
REntity.playerJoins(player);
PlayerSetup.playerJoins(player);
@ -65,4 +67,14 @@ public class JoinListener extends BasicListener {
PlayerSetup.playerLeaves(e.getPlayer());
e.setQuitMessage(null);
}
@EventHandler
public void onResourcepack(PlayerResourcePackStatusEvent e){
if(e.getStatus() == PlayerResourcePackStatusEvent.Status.ACCEPTED || e.getStatus() == PlayerResourcePackStatusEvent.Status.SUCCESSFULLY_LOADED)
return;
Player player = e.getPlayer();
player.sendMessage("§eSteam§8War» §cAuf Eventserver kann nur mit dem SteamWar-Resourcepack beigetreten werden");
player.kickPlayer(null);
}
}