bugfix 🪱 fixed possible bug that features may be activated even when config says they should not; improved loggin; properly added anvill event listener; replaced deprecated AnvillInventory with new AnvilView
This commit is contained in:
@@ -42,11 +42,18 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
|
||||
|
||||
// Registers Events
|
||||
this.getLogger().info(prefix + ChatColor.WHITE + "Load Events");
|
||||
this.getServer().getPluginManager().registerEvents(new BedListener(this.gameManager), this);
|
||||
this.getServer().getPluginManager().registerEvents(new KillListener(this.gameManager), this);
|
||||
this.getServer().getPluginManager().registerEvents(new InteractListener(this.gameManager), this);
|
||||
this.getServer().getPluginManager().registerEvents(new PrepareAnvilListener(this.gameManager), this);
|
||||
this.getServer().getPluginManager().registerEvents(this, this);
|
||||
|
||||
try {
|
||||
if(this.playerData.readBooleanFromConfig("improved_bed")) this.getServer().getPluginManager().registerEvents(new BedListener(this.gameManager), this);
|
||||
if(this.playerData.readBooleanFromConfig("custom_drops")) this.getServer().getPluginManager().registerEvents(new KillListener(this.gameManager), this);
|
||||
if(this.playerData.readBooleanFromConfig("replanting")) this.getServer().getPluginManager().registerEvents(new InteractListener(this.gameManager), this);
|
||||
if(this.playerData.readBooleanFromConfig("anvil_fix")) this.getServer().getPluginManager().registerEvents(new PrepareAnvilListener(this.gameManager), this);
|
||||
if(this.playerData.readBooleanFromConfig("back_command")) this.getServer().getPluginManager().registerEvents(this, this);
|
||||
|
||||
} catch (ConfigEntryExceptions e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
Objects.requireNonNull(this.getCommand("back")).setExecutor(new back(this.gameManager));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user