1.4.3 Release Canidate 1
This commit is contained in:
parent
2a0ddce7c3
commit
0bcb3dee0e
3 changed files with 17 additions and 6 deletions
|
@ -57,13 +57,24 @@ public class Main extends JavaPlugin implements Listener {
|
||||||
public Main() {
|
public Main() {
|
||||||
super();
|
super();
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
|
Config.loadConfig();
|
||||||
|
Localization.loadLocalization();
|
||||||
|
Items.loadItems();
|
||||||
|
|
||||||
board = new Board();
|
board = new Board();
|
||||||
database = new Database();
|
database = new Database();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Main(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) {
|
protected Main(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) {
|
||||||
super(loader, description, dataFolder, file);
|
super(loader, description, dataFolder, file);
|
||||||
|
|
||||||
instance = this;
|
instance = this;
|
||||||
|
|
||||||
|
Config.loadConfig();
|
||||||
|
Localization.loadLocalization();
|
||||||
|
Items.loadItems();
|
||||||
|
|
||||||
board = new Board();
|
board = new Board();
|
||||||
database = new Database();
|
database = new Database();
|
||||||
}
|
}
|
||||||
|
@ -72,10 +83,6 @@ public class Main extends JavaPlugin implements Listener {
|
||||||
|
|
||||||
this.registerListeners();
|
this.registerListeners();
|
||||||
|
|
||||||
Config.loadConfig();
|
|
||||||
Localization.loadLocalization();
|
|
||||||
Items.loadItems();
|
|
||||||
|
|
||||||
CommandHandler.registerCommands();
|
CommandHandler.registerCommands();
|
||||||
|
|
||||||
game = new Game(board);
|
game = new Game(board);
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class Debug implements ICommand {
|
||||||
}
|
}
|
||||||
Main.getInstance().getBoard().addHider(player);
|
Main.getInstance().getBoard().addHider(player);
|
||||||
PlayerLoader.loadHider(player, Main.getInstance().getGame().getGameWorld());
|
PlayerLoader.loadHider(player, Main.getInstance().getGame().getGameWorld());
|
||||||
|
if(Main.getInstance().getGame().getStatus() != Status.STARTING)
|
||||||
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
|
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
|
||||||
}));
|
}));
|
||||||
debugMenu.setItem(1, createOption(1, XMaterial.GOLDEN_CHESTPLATE.parseMaterial(), "&cBecome a &lSeeker", 1, player -> {
|
debugMenu.setItem(1, createOption(1, XMaterial.GOLDEN_CHESTPLATE.parseMaterial(), "&cBecome a &lSeeker", 1, player -> {
|
||||||
|
@ -46,6 +47,7 @@ public class Debug implements ICommand {
|
||||||
}
|
}
|
||||||
Main.getInstance().getBoard().addSeeker(player);
|
Main.getInstance().getBoard().addSeeker(player);
|
||||||
PlayerLoader.loadSeeker(player, Main.getInstance().getGame().getGameWorld());
|
PlayerLoader.loadSeeker(player, Main.getInstance().getGame().getGameWorld());
|
||||||
|
if(Main.getInstance().getGame().getStatus() != Status.STARTING)
|
||||||
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
|
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
|
||||||
}));
|
}));
|
||||||
debugMenu.setItem(2, createOption(2, XMaterial.IRON_CHESTPLATE.parseMaterial(), "&8Become a &lSpectator", 1, player -> {
|
debugMenu.setItem(2, createOption(2, XMaterial.IRON_CHESTPLATE.parseMaterial(), "&8Become a &lSpectator", 1, player -> {
|
||||||
|
|
|
@ -123,6 +123,8 @@ public class PlayerLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loadPlayer(Player player){
|
private static void loadPlayer(Player player){
|
||||||
|
player.setFlying(false);
|
||||||
|
player.setAllowFlight(false);
|
||||||
player.setGameMode(GameMode.ADVENTURE);
|
player.setGameMode(GameMode.ADVENTURE);
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
for(PotionEffect effect : player.getActivePotionEffects()) {
|
for(PotionEffect effect : player.getActivePotionEffects()) {
|
||||||
|
|
Loading…
Reference in a new issue