1.4.3 Release Canidate 1

This commit is contained in:
Tyler Murphy 2022-05-17 19:48:24 -04:00
parent 2a0ddce7c3
commit 0bcb3dee0e
3 changed files with 17 additions and 6 deletions

View file

@ -57,13 +57,24 @@ public class Main extends JavaPlugin implements Listener {
public Main() {
super();
instance = this;
Config.loadConfig();
Localization.loadLocalization();
Items.loadItems();
board = new Board();
database = new Database();
}
protected Main(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) {
super(loader, description, dataFolder, file);
instance = this;
Config.loadConfig();
Localization.loadLocalization();
Items.loadItems();
board = new Board();
database = new Database();
}
@ -72,10 +83,6 @@ public class Main extends JavaPlugin implements Listener {
this.registerListeners();
Config.loadConfig();
Localization.loadLocalization();
Items.loadItems();
CommandHandler.registerCommands();
game = new Game(board);

View file

@ -38,7 +38,8 @@ public class Debug implements ICommand {
}
Main.getInstance().getBoard().addHider(player);
PlayerLoader.loadHider(player, Main.getInstance().getGame().getGameWorld());
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
if(Main.getInstance().getGame().getStatus() != Status.STARTING)
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
}));
debugMenu.setItem(1, createOption(1, XMaterial.GOLDEN_CHESTPLATE.parseMaterial(), "&cBecome a &lSeeker", 1, player -> {
if(mapSaveEnabled) {
@ -46,7 +47,8 @@ public class Debug implements ICommand {
}
Main.getInstance().getBoard().addSeeker(player);
PlayerLoader.loadSeeker(player, Main.getInstance().getGame().getGameWorld());
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
if(Main.getInstance().getGame().getStatus() != Status.STARTING)
PlayerLoader.resetPlayer(player, Main.getInstance().getBoard());
}));
debugMenu.setItem(2, createOption(2, XMaterial.IRON_CHESTPLATE.parseMaterial(), "&8Become a &lSpectator", 1, player -> {
if(mapSaveEnabled) {

View file

@ -123,6 +123,8 @@ public class PlayerLoader {
}
private static void loadPlayer(Player player){
player.setFlying(false);
player.setAllowFlight(false);
player.setGameMode(GameMode.ADVENTURE);
player.getInventory().clear();
for(PotionEffect effect : player.getActivePotionEffects()) {