Fixes
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
d0c0b250e5
Commit
947afe7e1f
@ -58,14 +58,12 @@ public class Fight {
|
||||
}
|
||||
|
||||
public static FightTeam getOpposite(FightTeam fightTeam) {
|
||||
if(fightTeam == null){
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
if(fightTeam == redTeam)
|
||||
return blueTeam;
|
||||
else
|
||||
else if(fightTeam == blueTeam)
|
||||
return redTeam;
|
||||
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
public static FightTeam getInvitedTeam(Player player){
|
||||
|
@ -58,7 +58,6 @@ public class EventJoin implements Listener {
|
||||
@EventHandler
|
||||
public void handlePlayerJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
//player.setResourcePack("https://steamwar.de/antixray.zip");
|
||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||
|
||||
if(FightState.Setup.contains(FightState.getFightState())){
|
||||
@ -101,14 +100,4 @@ public class EventJoin implements Listener {
|
||||
if(player == FightSystem.getEventLeiter())
|
||||
FightSystem.setEventLeiter(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(FightSystem.PREFIX + "§cAuf Eventserver kann nur mit dem SteamWar-Resourcepack beigetreten werden");
|
||||
player.kickPlayer(null);
|
||||
}*/
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package de.steamwar.fightsystem.listener;
|
||||
|
||||
import de.steamwar.fightsystem.ArenaMode;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
|
||||
|
||||
public class ResourcePack implements Listener {
|
||||
|
||||
public ResourcePack(){
|
||||
new StateDependentListener(ArenaMode.Event, FightState.All, this);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void handlePlayerJoin(PlayerJoinEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
player.setResourcePack("https://steamwar.de/antixray.zip");
|
||||
}
|
||||
|
||||
@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(FightSystem.PREFIX + "§cAuf Eventserver kann nur mit dem SteamWar-Resourcepack beigetreten werden");
|
||||
player.sendMessage(FightSystem.PREFIX + "§cDa du abgelehnt hast, musst du nun in der Serverliste erstmal wieder Ressourcenpakete von SteamWar aktivieren.");
|
||||
player.kickPlayer(null);
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren