Force resourcepack
Dieser Commit ist enthalten in:
Ursprung
ccc1388cc3
Commit
c208fab359
@ -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);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren