first commit
This commit is contained in:
parent
0f0653c64f
commit
a195140325
|
@ -5,6 +5,7 @@ import eu.univento.core.api.server.ServerSettings;
|
||||||
import eu.univento.maya.game.GameStage;
|
import eu.univento.maya.game.GameStage;
|
||||||
import eu.univento.maya.game.LobbyCounter;
|
import eu.univento.maya.game.LobbyCounter;
|
||||||
import eu.univento.maya.listener.PlayerEvents;
|
import eu.univento.maya.listener.PlayerEvents;
|
||||||
|
import lombok.Getter;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -22,38 +23,17 @@ import java.util.logging.Logger;
|
||||||
*/
|
*/
|
||||||
public class Maya extends JavaPlugin{
|
public class Maya extends JavaPlugin{
|
||||||
|
|
||||||
/**
|
@Getter
|
||||||
* instance
|
|
||||||
*/
|
|
||||||
private static Maya instance;
|
private static Maya instance;
|
||||||
/**
|
|
||||||
* @return plugin instance
|
|
||||||
*/
|
|
||||||
public static Maya getInstance() {
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* logging and stuff
|
|
||||||
*/
|
|
||||||
private static Logger logger = Bukkit.getLogger();
|
private static Logger logger = Bukkit.getLogger();
|
||||||
|
|
||||||
/**
|
|
||||||
* game stage
|
|
||||||
*/
|
|
||||||
private static GameStage stage;
|
private static GameStage stage;
|
||||||
|
|
||||||
/**
|
|
||||||
* @return GameStage
|
|
||||||
*/
|
|
||||||
public static GameStage getStage() {
|
public static GameStage getStage() {
|
||||||
return stage;
|
return stage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* sets gamestage
|
|
||||||
* @param stage GameStage
|
|
||||||
*/
|
|
||||||
public static void setStage(GameStage stage) {
|
public static void setStage(GameStage stage) {
|
||||||
Maya.stage = stage;
|
Maya.stage = stage;
|
||||||
}
|
}
|
||||||
|
@ -77,15 +57,11 @@ public class Maya extends JavaPlugin{
|
||||||
public static int buyID;
|
public static int buyID;
|
||||||
public static int deathmatchID;
|
public static int deathmatchID;
|
||||||
public static int restartID;
|
public static int restartID;
|
||||||
/**
|
|
||||||
* @param level Log level
|
|
||||||
* @param string String
|
|
||||||
*/
|
|
||||||
public static void log(Level level, String string) {
|
public static void log(Level level, String string) {
|
||||||
logger.log(level, "[" + getInstance().getDescription().getName() + "] " + string);
|
logger.log(level, "[" + getInstance().getDescription().getName() + "] " + string);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
Loading…
Reference in New Issue