53 Zeilen
1.4 KiB
Java
53 Zeilen
1.4 KiB
Java
package de.steamwar.fightsystem;
|
|
|
|
import de.steamwar.sql.EventFight;
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
public class IFightSystem {
|
|
private IFightSystem(){}
|
|
|
|
private static Plugin plugin;
|
|
private static String prefix;
|
|
private static EventFight eventFight;
|
|
private static boolean entern = false;
|
|
private static Player eventLeiter;
|
|
|
|
public static void init(Plugin plugin, String prefix){
|
|
IFightSystem.plugin = plugin;
|
|
IFightSystem.prefix = prefix;
|
|
}
|
|
static void setEventFight(EventFight ef){
|
|
eventFight = ef;
|
|
}
|
|
static void setEntern(boolean entern){
|
|
IFightSystem.entern = entern;
|
|
}
|
|
static void setEventLeiter(Player el){
|
|
eventLeiter = el;
|
|
}
|
|
|
|
public static Plugin getPlugin(){
|
|
return plugin;
|
|
}
|
|
public static String getPrefix(){
|
|
return prefix;
|
|
}
|
|
public static EventFight getEventFight(){
|
|
return eventFight;
|
|
}
|
|
public static boolean isEntern(){
|
|
return entern;
|
|
}
|
|
public static Player getEventLeiter(){
|
|
return eventLeiter;
|
|
}
|
|
public static void shutdown(String reason){
|
|
if(reason != null)
|
|
Bukkit.broadcastMessage(reason);
|
|
Bukkit.getOnlinePlayers().forEach(player -> player.kickPlayer(null));
|
|
Bukkit.shutdown();
|
|
}
|
|
}
|