More refactoring

Replace some getters with lombok
Fix compile error in standalone mode
Exclude some unnecessary class files from the final jar
This commit is contained in:
GeorgH93 2020-08-16 03:32:22 +02:00
parent bd9d30804f
commit 1230e24755
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8
4 changed files with 15 additions and 16 deletions

View File

@ -53,7 +53,7 @@
<goal>jar</goal>
</goals>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<doclint>none</doclint>
<source>8</source>
</configuration>
</execution>

View File

@ -170,6 +170,16 @@
<include>at.pcgamingfreaks:PluginLib</include>
</includes>
</artifactSet>
<filters>
<filter>
<artifact>at.pcgamingfreaks:PluginLib</artifact>
<excludes>
<exclude>at/pcgamingfreaks/Bukkit/Particles/**</exclude>
<exclude>at/pcgamingfreaks/Bungee/**</exclude>
<exclude>at/pcgamingfreaks/PluginLib/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>at.pcgf.libs</pattern>

View File

@ -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();

View File

@ -78,8 +78,8 @@ public class Minepacks extends JavaPlugin implements MinepacksPlugin
private CommandManager commandManager;
private InventoryClearCommand inventoryClearCommand;
private Collection<GameMode> 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)
{