Minor code quality fixes

This commit is contained in:
Florian CUNY 2018-01-27 16:39:02 +01:00
parent 475f9b1416
commit 8b636a8ee3
5 changed files with 5 additions and 20 deletions

View File

@ -1,7 +1,7 @@
package us.tastybento.bskyblock;
/**
* All the plugin settings are here
* All the plugin constants are here
* @author Tastybento
*/
public class Constants {
@ -18,8 +18,6 @@ public class Constants {
public final static String PERMPREFIX = "acidisland.";
// The island command
public final static String ISLANDCOMMAND = "ai";
// The challenge command
public static final String CHALLENGECOMMAND = "aic";
// Admin command
public static final String ADMINCOMMAND = "acid";
*/
@ -28,8 +26,6 @@ public class Constants {
public final static String PERMPREFIX = "bskyblock.";
// The island command
public final static String ISLANDCOMMAND = "island";
// The challenge command
public static final String CHALLENGECOMMAND = "bsc";
// The spawn command (Essentials spawn for example)
public final static String SPAWNCOMMAND = "spawn";
// Admin command

View File

@ -35,7 +35,7 @@ public class IslandBuilder {
ISLAND,
NETHER,
END
};
}
private Island island;
private World world;
@ -48,7 +48,6 @@ public class IslandBuilder {
private BSkyBlock plugin;
public IslandBuilder(BSkyBlock plugin, Island island) {
super();
this.plugin = plugin;
this.island = island;
this.world = island.getWorld();

View File

@ -37,8 +37,6 @@ public final class AddonsManager {
private final Map<String, Class<?>> classes = new HashMap<String, Class<?>>();
private BSkyBlock plugin;
public AddonsManager(BSkyBlock plugin) {
this.plugin = plugin;
this.addons = new ArrayList<>();
@ -47,7 +45,6 @@ public final class AddonsManager {
/**
* Loads all the addons from the addons folder
* @throws InvalidDescriptionException
*/
public void enableAddons() {
File f = new File(plugin.getDataFolder(), "addons");
@ -57,11 +54,7 @@ public final class AddonsManager {
if (!file.isDirectory()) {
try {
this.loadAddon(file);
} catch (InvalidAddonFormatException e) {
e.printStackTrace();
} catch (InvalidAddonInheritException e) {
e.printStackTrace();
} catch (InvalidDescriptionException e) {
} catch (InvalidAddonFormatException | InvalidAddonInheritException | InvalidDescriptionException e) {
e.printStackTrace();
}
}
@ -78,7 +71,7 @@ public final class AddonsManager {
}
}
this.addons.stream().forEach(addon -> {
this.addons.forEach(addon -> {
addon.onEnable();
Bukkit.getPluginManager().callEvent(AddonEvent.builder().addon(addon).reason(AddonEvent.Reason.ENABLE).build());
addon.setEnabled(true);

View File

@ -32,6 +32,4 @@ public final class CommandsManager {
return commands.get(command);
}
}

View File

@ -11,8 +11,7 @@ import us.tastybento.bskyblock.BSkyBlock;
/**
* Handles hooks with other Placeholder APIs.
*
* @author Poslovitch
* @author Tastybento
* @author Poslovitch, Tastybento
*/
public class PlaceholderHandler {
private static final String PACKAGE = "us.tastybento.bskyblock.util.placeholders.hooks.";