Beta 20220416-SNAPSHOT

Changelog:
 - Changed the way classes interact with the PlayerHandler by using a getter instead of the actual field.
 - Added #isTool(Material) to ItemBuilder to check if an item is, in fact, a type of tool.
 - Created the UnbreakableTool listener which will grant the unbreakable status to a tool if a user is lucky enough.
  NOTE: This is a beta feature, and while it may remain included the way it works will most likely change.
This commit is contained in:
Paldiu
2022-04-16 17:27:54 -05:00
parent 077ed05d74
commit b424a83062
15 changed files with 91 additions and 36 deletions

View File

@ -16,8 +16,7 @@ import java.util.UUID;
public final class FeelingLucky extends JavaPlugin {
private final Map<UUID, PlayerConfig> configMap = new HashMap<>();
public LuckCMD cmd;
public PlayerHandler handler;
private PlayerHandler handler;
public Map<UUID, PlayerConfig> getConfigMap() {
return configMap;
@ -32,7 +31,7 @@ public final class FeelingLucky extends JavaPlugin {
getLogger().info("Registration complete! Attempting to load all player configuration files...");
loadConfigurations();
Bukkit.getLogger().info("Attempting to load the Luck command...");
cmd = new LuckCMD(this);
new LuckCMD(this);
Bukkit.getLogger().info("Successfully loaded the Luck command!");
Bukkit.getLogger().info("Successfully initialized!");
@ -68,5 +67,10 @@ public final class FeelingLucky extends JavaPlugin {
new ExpBoost(this);
new CheatDeath(this);
new BonemealFullCrop(this);
new UnbreakableTool(this);
}
public PlayerHandler getHandler() {
return handler;
}
}