From 1230e24755f46cbca6281a73c31fc737751d4e74 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sun, 16 Aug 2020 03:32:22 +0200 Subject: [PATCH] More refactoring Replace some getters with lombok Fix compile error in standalone mode Exclude some unnecessary class files from the final jar --- Minepacks-API/pom.xml | 2 +- Minepacks/pom.xml | 10 ++++++++++ .../Minepacks/Bukkit/Database/Database.java | 2 +- .../Minepacks/Bukkit/Minepacks.java | 17 +++-------------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Minepacks-API/pom.xml b/Minepacks-API/pom.xml index 9683ac7..3ab84ed 100644 --- a/Minepacks-API/pom.xml +++ b/Minepacks-API/pom.xml @@ -53,7 +53,7 @@ jar - -Xdoclint:none + none 8 diff --git a/Minepacks/pom.xml b/Minepacks/pom.xml index 2ffdcb2..07cea07 100644 --- a/Minepacks/pom.xml +++ b/Minepacks/pom.xml @@ -170,6 +170,16 @@ at.pcgamingfreaks:PluginLib + + + at.pcgamingfreaks:PluginLib + + at/pcgamingfreaks/Bukkit/Particles/** + at/pcgamingfreaks/Bungee/** + at/pcgamingfreaks/PluginLib/** + + + at.pcgf.libs diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java index 0c55b7f..78bc16b 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Database/Database.java @@ -88,7 +88,7 @@ public boolean available() public static @Nullable ConnectionProvider getGlobalConnectionProvider(final @NotNull Logger logger) { /*if[STANDALONE] - plugin.getLogger().warning(ConsoleColor.RED + "The shared database connection option is not available in standalone mode!" + ConsoleColor.RESET); + logger.warning(ConsoleColor.RED + "The shared database connection option is not available in standalone mode!" + ConsoleColor.RESET); return null; else[STANDALONE]*/ at.pcgamingfreaks.PluginLib.Database.DatabaseConnectionPool pool = at.pcgamingfreaks.PluginLib.Bukkit.PluginLib.getInstance().getDatabaseConnectionPool(); diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java index 2794615..95d5c63 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Minepacks.java @@ -78,8 +78,8 @@ public class Minepacks extends JavaPlugin implements MinepacksPlugin private CommandManager commandManager; private InventoryClearCommand inventoryClearCommand; private Collection gameModes; - private CooldownManager cooldownManager = null; - private ItemFilter itemFilter = null; + @Getter private CooldownManager cooldownManager = null; + @Getter private ItemFilter itemFilter = null; private Sound openSound = null; private ItemShortcut shortcut = null; @@ -363,7 +363,7 @@ public int getBackpackPermSize(final @NotNull Player player) return 9; } - public WorldBlacklistMode isDisabled(final @NotNull Player player) + public @NotNull WorldBlacklistMode isDisabled(final @NotNull Player player) { if(worldBlacklistMode == WorldBlacklistMode.None || (worldBlacklistMode != WorldBlacklistMode.NoPlugin && player.hasPermission(Permissions.IGNORE_WORLD_BLACKLIST))) return WorldBlacklistMode.None; if(worldBlacklist.contains(player.getWorld().getName().toLowerCase(Locale.ROOT))) return worldBlacklistMode; @@ -376,17 +376,6 @@ public boolean isPlayerGameModeAllowed(final @NotNull Player player) return gameModes.contains(player.getGameMode()) || player.hasPermission(Permissions.IGNORE_GAME_MODE); } - public @Nullable CooldownManager getCooldownManager() - { - return cooldownManager; - } - - @Override - public @Nullable ItemFilter getItemFilter() - { - return itemFilter; - } - @Override public boolean isBackpackItem(final @Nullable ItemStack itemStack) {