Refactored commands and added permissions pt2

This commit is contained in:
Esophose 2019-03-10 05:15:05 -06:00
parent 686facd6cb
commit bff9847980
53 changed files with 1003 additions and 1655 deletions

View File

@ -136,11 +136,22 @@ public class CommandManager implements CommandExecutor, TabCompleter {
}
SubCommand subCommand;
boolean isAdmin;
if (args[0].equalsIgnoreCase("help")) {
if (player == null) {
sendConsoleHelpCommands(sender);
} else {
boolean canUseHelp = player.hasPermission("fabledskyblock.*")
|| player.hasPermission("fabledskyblock.island.*")
|| player.hasPermission("fabledskyblock.island.help");
if (!canUseHelp) {
messageManager.sendMessage(player, configLoad.getString("Command.PermissionDenied.Admin.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
return;
}
int page = -1;
if (!fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml"))
@ -166,10 +177,19 @@ public class CommandManager implements CommandExecutor, TabCompleter {
return;
} else if (args[0].equalsIgnoreCase("admin")) {
if (args.length == 1 || args[1].equalsIgnoreCase("help")) {
if (player == null) {
if (player == null) {
sendConsoleHelpCommands(sender);
} else {
boolean canUseHelp = player.hasPermission("fabledskyblock.*")
|| player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.admin.help");
if (!canUseHelp) {
messageManager.sendMessage(player, configLoad.getString("Command.PermissionDenied.Admin.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
return;
}
int page = -1;
if (!fileManager.getConfig(new File(skyblock.getDataFolder(), "config.yml"))
@ -192,24 +212,29 @@ public class CommandManager implements CommandExecutor, TabCompleter {
sendPlayerAdminHelpCommands(player, page);
}
} else {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Help.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
return;
}
subCommand = getAdminSubCommand(args[1]);
isAdmin = true;
} else {
subCommand = getIslandSubCommand(args[0]);
isAdmin = false;
}
if (subCommand == null) {
messageManager.sendMessage(sender,
configLoad.getString("Command.Island.Argument.Unrecognised.Message"));
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Argument.Unrecognised.Message"));
soundManager.playSound(sender, Sounds.VILLAGER_NO.bukkitSound(), 1.0F, 1.0F);
} else {
return;
}
if (!subCommand.hasPermission(player, isAdmin)) {
messageManager.sendMessage(player, configLoad.getString("Command.PermissionDenied." + (isAdmin ? "Admin" : "Island") + ".Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
return;
}
List<String> arguments = new ArrayList<>();
arguments.addAll(Arrays.asList(args));
arguments.remove(args[0]);
@ -225,7 +250,6 @@ public class CommandManager implements CommandExecutor, TabCompleter {
arguments.toArray(new String[0]));
}
}
}
}.runTaskAsynchronously(skyblock);
}
@ -390,19 +414,11 @@ public class CommandManager implements CommandExecutor, TabCompleter {
if (page == -1) {
for (SubCommand subCommand : subCommands) {
String commandAliases = "";
StringBuilder commandAliases = new StringBuilder();
if (showAlises) {
for (int i1 = 0; i1 < subCommand.getAliases().length; i1++) {
if (i1 == 0) {
commandAliases = "/";
}
if (i1 == subCommand.getAliases().length - 1) {
commandAliases = commandAliases + subCommand.getAliases()[i1];
} else {
commandAliases = commandAliases + subCommand.getAliases()[i1] + "/";
}
for (int i = 0; i < subCommand.getAliases().length; i++) {
commandAliases.append("/").append(subCommand.getAliases()[i]);
}
}
@ -420,19 +436,11 @@ public class CommandManager implements CommandExecutor, TabCompleter {
for (; index < endIndex; index++) {
if (subCommands.size() > index) {
SubCommand subCommandFromIndex = subCommands.get(index);
String commandAliases = "";
StringBuilder commandAliases = new StringBuilder();
if (showAlises) {
for (int i = 0; i < subCommandFromIndex.getAliases().length; i++) {
if (i == 0) {
commandAliases = "/";
}
if (i == subCommandFromIndex.getAliases().length) {
commandAliases = commandAliases + subCommandFromIndex.getAliases()[i];
} else {
commandAliases = commandAliases + subCommandFromIndex.getAliases()[i] + "/";
}
commandAliases.append("/").append(subCommandFromIndex.getAliases()[i]);
}
}

View File

@ -1,20 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -25,6 +11,16 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.upgrade.Upgrade;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
public class AddUpgradeCommand extends SubCommand {
@ -48,14 +44,6 @@ public class AddUpgradeCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.addupgrade")
|| player.hasPermission("fabledskyblock.admin.*") || player.hasPermission("fabledskyblock.*")) {
if (args.length == 2) {
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
UUID islandOwnerUUID;
@ -144,11 +132,6 @@ public class AddUpgradeCommand extends SubCommand {
configLoad.getString("Command.Island.Admin.AddUpgrade.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(sender,
configLoad.getString("Command.Island.Admin.AddUpgrade.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -157,8 +140,8 @@ public class AddUpgradeCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.AddUpgrade.Info.Message";
}
@Override
@ -170,9 +153,4 @@ public class AddUpgradeCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,21 +1,12 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.admin.Creator;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
public class CreateCommand extends SubCommand {
@ -23,24 +14,13 @@ public class CreateCommand extends SubCommand {
public void onCommandByPlayer(Player player, String[] args) {
PlayerDataManager playerDataManager = skyblock.getPlayerDataManager();
SoundManager soundManager = skyblock.getSoundManager();
FileManager fileManager = skyblock.getFileManager();
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (player.hasPermission("fabledskyblock.admin.create") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
if (playerDataManager.hasPlayerData(player)) {
playerDataManager.getPlayerData(player).setViewer(null);
}
Creator.getInstance().open(player);
soundManager.playSound(player, Sounds.CHEST_OPEN.bukkitSound(), 1.0F, 1.0F);
} else {
skyblock.getMessageManager().sendMessage(player,
configLoad.getString("Command.Island.Admin.Create.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -54,8 +34,8 @@ public class CreateCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Create.Info.Message";
}
@Override
@ -67,9 +47,4 @@ public class CreateCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,20 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -25,6 +11,16 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class DeleteCommand extends SubCommand {
@ -53,8 +49,6 @@ public class DeleteCommand extends SubCommand {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.delete") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
if (args.length == 1) {
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
UUID targetPlayerUUID;
@ -108,10 +102,6 @@ public class DeleteCommand extends SubCommand {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Delete.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Delete.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -120,8 +110,8 @@ public class DeleteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Delete.Info.Message";
}
@Override
@ -133,9 +123,4 @@ public class DeleteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.admin.Generator;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class GeneratorCommand extends SubCommand {
@ -30,12 +26,7 @@ public class GeneratorCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (!(player.hasPermission("fabledskyblock.admin.generator") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*"))) {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.Generator.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else if (skyblock.getGeneratorManager() == null) {
if (skyblock.getGeneratorManager() == null) {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Generator.Disabled.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else {
@ -59,8 +50,8 @@ public class GeneratorCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Generator.Info.Message";
}
@Override
@ -72,9 +63,4 @@ public class GeneratorCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,40 +1,20 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.admin.Levelling;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
public class LevelCommand extends SubCommand {
@Override
public void onCommandByPlayer(Player player, String[] args) {
SoundManager soundManager = skyblock.getSoundManager();
FileManager fileManager = skyblock.getFileManager();
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (player.hasPermission("fabledskyblock.admin.level") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
Levelling.getInstance().open(player);
soundManager.playSound(player, Sounds.CHEST_OPEN.bukkitSound(), 1.0F, 1.0F);
} else {
skyblock.getMessageManager().sendMessage(player,
configLoad.getString("Command.Island.Admin.Level.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -48,8 +28,8 @@ public class LevelCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Level.Info.Message";
}
@Override
@ -61,9 +41,4 @@ public class LevelCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,18 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.message.MessageManager;
@ -20,6 +8,14 @@ import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class OwnerCommand extends SubCommand {
@ -42,14 +38,6 @@ public class OwnerCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.owner") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
if (args.length == 1) {
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
UUID targetPlayerUUID, islandOwnerUUID;
@ -93,10 +81,6 @@ public class OwnerCommand extends SubCommand {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Owner.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Owner.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -105,8 +89,8 @@ public class OwnerCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Owner.Info.Message";
}
@Override
@ -118,9 +102,4 @@ public class OwnerCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,18 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.generator.GeneratorManager;
@ -24,6 +12,14 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.scoreboard.ScoreboardManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.Map;
public class ReloadCommand extends SubCommand {
@ -46,14 +42,6 @@ public class ReloadCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.reload") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
Map<String, Config> configs = fileManager.getConfigs();
for (int i = 0; i < configs.size(); i++) {
@ -109,10 +97,6 @@ public class ReloadCommand extends SubCommand {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Reload.Reloaded.Message"));
soundManager.playSound(sender, Sounds.ANVIL_USE.bukkitSound(), 1.0F, 1.0F);
} else {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.Reload.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -121,8 +105,8 @@ public class ReloadCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Reload.Info.Message";
}
@Override
@ -134,9 +118,4 @@ public class ReloadCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,19 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.io.IOException;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.hologram.Hologram;
@ -22,6 +9,15 @@ import me.goodandevil.skyblock.hologram.HologramType;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
public class RemoveHologramCommand extends SubCommand {
@ -44,14 +40,6 @@ public class RemoveHologramCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.removehologram")
|| player.hasPermission("fabledskyblock.admin.*") || player.hasPermission("fabledskyblock.*")) {
if (args.length == 1) {
HologramType hologramType = null;
@ -78,17 +66,14 @@ public class RemoveHologramCommand extends SubCommand {
e.printStackTrace();
}
Bukkit.getServer().getScheduler().runTask(skyblock, new Runnable() {
@Override
public void run() {
HologramType hologramType = HologramType
Bukkit.getServer().getScheduler().runTask(skyblock, () -> {
HologramType hologramType1 = HologramType
.valueOf(WordUtils.capitalize(args[0].toLowerCase()));
Hologram hologram = hologramManager.getHologram(hologramType);
Hologram hologram = hologramManager.getHologram(hologramType1);
if (hologram != null) {
hologramManager.removeHologram(hologram);
}
}
});
messageManager.sendMessage(sender,
@ -101,14 +86,8 @@ public class RemoveHologramCommand extends SubCommand {
}
}
messageManager.sendMessage(sender,
configLoad.getString("Command.Island.Admin.RemoveHologram.Invalid.Message"));
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.RemoveHologram.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else {
messageManager.sendMessage(sender,
configLoad.getString("Command.Island.Admin.RemoveHologram.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -117,8 +96,8 @@ public class RemoveHologramCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.RemoveHologram.Info.Message";
}
@Override
@ -130,9 +109,4 @@ public class RemoveHologramCommand extends SubCommand {
public String[] getArguments() {
return new String[] { "level", "votes" };
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,20 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -25,6 +11,16 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.upgrade.Upgrade;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
public class RemoveUpgradeCommand extends SubCommand {
@ -48,14 +44,6 @@ public class RemoveUpgradeCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.removeupgrade")
|| player.hasPermission("fabledskyblock.admin.*") || player.hasPermission("fabledskyblock.*")) {
if (args.length == 2) {
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
UUID islandOwnerUUID;
@ -144,11 +132,6 @@ public class RemoveUpgradeCommand extends SubCommand {
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(sender,
configLoad.getString("Command.Island.Admin.RemoveUpgrade.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -157,8 +140,8 @@ public class RemoveUpgradeCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.RemoveUpgrade.Info.Message";
}
@Override
@ -170,9 +153,4 @@ public class RemoveUpgradeCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.hologram.Hologram;
@ -20,6 +9,13 @@ import me.goodandevil.skyblock.hologram.HologramType;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class SetHologramCommand extends SubCommand {
@ -33,8 +29,6 @@ public class SetHologramCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (player.hasPermission("fabledskyblock.admin.sethologram") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
if (args.length == 1) {
HologramType hologramType = null;
@ -45,25 +39,20 @@ public class SetHologramCommand extends SubCommand {
}
if (hologramType != null) {
if (hologramType == HologramType.Level || hologramType == HologramType.Votes) {
fileManager.setLocation(
fileManager.getConfig(new File(skyblock.getDataFolder(), "locations.yml")),
"Location.Hologram.Leaderboard." + hologramType.name(), player.getLocation(), true);
}
Bukkit.getServer().getScheduler().runTask(skyblock, new Runnable() {
@Override
public void run() {
HologramType hologramType = HologramType
Bukkit.getServer().getScheduler().runTask(skyblock, () -> {
HologramType hologramType1 = HologramType
.valueOf(WordUtils.capitalize(args[0].toLowerCase()));
Hologram hologram = hologramManager.getHologram(hologramType);
Hologram hologram = hologramManager.getHologram(hologramType1);
if (hologram != null) {
hologramManager.removeHologram(hologram);
}
hologramManager.spawnHologram(hologramType);
}
hologramManager.spawnHologram(hologramType1);
});
messageManager.sendMessage(player,
@ -78,11 +67,6 @@ public class SetHologramCommand extends SubCommand {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.SetHologram.Invalid.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.SetHologram.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -96,8 +80,8 @@ public class SetHologramCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.SetHologram.Info.Message";
}
@Override
@ -109,9 +93,4 @@ public class SetHologramCommand extends SubCommand {
public String[] getArguments() {
return new String[] { "level", "votes" };
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,20 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -25,6 +11,16 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.NumberUtil;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
public class SetSizeCommand extends SubCommand {
@ -48,14 +44,6 @@ public class SetSizeCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
Player player = null;
if (sender instanceof Player) {
player = (Player) sender;
}
if (player == null || player.hasPermission("fabledskyblock.admin.setsize") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
if (args.length == 2) {
if (args[1].matches("[0-9]+")) {
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
@ -135,10 +123,6 @@ public class SetSizeCommand extends SubCommand {
configLoad.getString("Command.Island.Admin.SetSize.Invalid.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(sender, configLoad.getString("Command.Island.Admin.SetSize.Permission.Message"));
soundManager.playSound(sender, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -147,8 +131,8 @@ public class SetSizeCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.SetSize.Info.Message";
}
@Override
@ -160,9 +144,4 @@ public class SetSizeCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,20 +1,16 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class SetSpawnCommand extends SubCommand {
@ -27,17 +23,10 @@ public class SetSpawnCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (player.hasPermission("fabledskyblock.admin.setspawn") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
fileManager.setLocation(fileManager.getConfig(new File(skyblock.getDataFolder(), "locations.yml")),
"Location.Spawn", player.getLocation(), true);
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.SetSpawn.Set.Message"));
soundManager.playSound(player, Sounds.LEVEL_UP.bukkitSound(), 1.0F, 1.0F);
} else {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.SetSpawn.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -51,8 +40,8 @@ public class SetSpawnCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.SetSpawn.Info.Message";
}
@Override
@ -64,9 +53,4 @@ public class SetSpawnCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,40 +1,20 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.admin.Settings;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
public class SettingsCommand extends SubCommand {
@Override
public void onCommandByPlayer(Player player, String[] args) {
SoundManager soundManager = skyblock.getSoundManager();
FileManager fileManager = skyblock.getFileManager();
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (player.hasPermission("fabledskyblock.admin.settings") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*")) {
Settings.getInstance().open(player, Settings.Type.Categories, null);
soundManager.playSound(player, Sounds.CHEST_OPEN.bukkitSound(), 1.0F, 1.0F);
} else {
skyblock.getMessageManager().sendMessage(player,
configLoad.getString("Command.Island.Admin.Settings.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
}
@Override
@ -48,8 +28,8 @@ public class SettingsCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Settings.Info.Message";
}
@Override
@ -61,9 +41,4 @@ public class SettingsCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,16 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerData;
@ -22,9 +12,15 @@ import me.goodandevil.skyblock.utils.world.LocationUtil;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.logging.Level;
public class StructureCommand extends SubCommand {
@ -36,7 +32,7 @@ public class StructureCommand extends SubCommand {
Config config = skyblock.getFileManager().getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (args.length == 0 || (args.length > 0 && args[0].equalsIgnoreCase("help"))) {
if (args.length == 0 || args[0].equalsIgnoreCase("help")) {
for (String helpLines : configLoad.getStringList("Command.Island.Help.Lines")) {
if (helpLines.contains("%type")) {
helpLines = helpLines.replace("%type", "Structure");
@ -92,13 +88,8 @@ public class StructureCommand extends SubCommand {
}
soundManager.playSound(player, Sounds.ARROW_HIT.bukkitSound(), 1.0F, 1.0F);
return;
} else {
if (args[0].equalsIgnoreCase("tool")) {
if (player.hasPermission("fabledskyblock.admin.structure.tool")
|| player.hasPermission("fabledskyblock.admin.structure.*")
|| player.hasPermission("fabledskyblock.admin.*") || player.hasPermission("fabledskyblock.*")) {
try {
ItemStack is = StructureUtil.getTool();
@ -127,17 +118,9 @@ public class StructureCommand extends SubCommand {
Bukkit.getServer().getLogger().log(Level.WARNING,
"SkyBlock | Error: The defined material in the configuration file for the Structure selection tool could not be found.");
}
} else {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.Structure.Tool.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
return;
} else if (args[0].equalsIgnoreCase("save")) {
if (player.hasPermission("fabledskyblock.admin.structure.save")
|| player.hasPermission("fabledskyblock.admin.structure.*")
|| player.hasPermission("fabledskyblock.admin.*") || player.hasPermission("fabledskyblock.*")) {
if (args.length == 2) {
PlayerData playerData = skyblock.getPlayerDataManager().getPlayerData(player);
@ -192,11 +175,6 @@ public class StructureCommand extends SubCommand {
configLoad.getString("Command.Island.Admin.Structure.Save.Invalid.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
} else {
messageManager.sendMessage(player,
configLoad.getString("Command.Island.Admin.Structure.Tool.Save.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
}
return;
}
@ -217,8 +195,8 @@ public class StructureCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Structure.Info.Message";
}
@Override
@ -230,9 +208,4 @@ public class StructureCommand extends SubCommand {
public String[] getArguments() {
return new String[] { "tool", "save" };
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.admin;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.admin.Upgrade;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class UpgradeCommand extends SubCommand {
@ -30,11 +26,7 @@ public class UpgradeCommand extends SubCommand {
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
FileConfiguration configLoad = config.getFileConfiguration();
if (!(player.hasPermission("fabledskyblock.admin.upgrade") || player.hasPermission("fabledskyblock.admin.*")
|| player.hasPermission("fabledskyblock.*"))) {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Upgrade.Permission.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else if (skyblock.getUpgradeManager() == null) {
if (skyblock.getUpgradeManager() == null) {
messageManager.sendMessage(player, configLoad.getString("Command.Island.Admin.Upgrade.Disabled.Message"));
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
} else {
@ -58,8 +50,8 @@ public class UpgradeCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Admin.Upgrade.Info.Message";
}
@Override
@ -71,9 +63,4 @@ public class UpgradeCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Admin;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -18,6 +9,11 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class BorderCommand extends SubCommand {
@ -64,8 +60,8 @@ public class BorderCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Border.Info.Message";
}
@Override
@ -77,9 +73,4 @@ public class BorderCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,16 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.invite.Invite;
import me.goodandevil.skyblock.invite.InviteManager;
@ -20,6 +10,12 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class CancelCommand extends SubCommand {
@ -92,8 +88,8 @@ public class CancelCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Cancel.Info.Message";
}
@Override
@ -105,9 +101,4 @@ public class CancelCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,13 +1,7 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.api.event.player.PlayerIslandChatSwitchEvent;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -17,10 +11,12 @@ import me.goodandevil.skyblock.playerdata.PlayerData;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.api.event.player.PlayerIslandChatSwitchEvent;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class ChatCommand extends SubCommand {
@ -77,8 +73,8 @@ public class ChatCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Chat.Info.Message";
}
@Override
@ -90,9 +86,4 @@ public class ChatCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class CloseCommand extends SubCommand {
@ -63,8 +59,8 @@ public class CloseCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Close.Info.Message";
}
@Override
@ -76,9 +72,4 @@ public class CloseCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,19 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.confirmation.Confirmation;
@ -31,6 +18,15 @@ import me.goodandevil.skyblock.structure.StructureManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class ConfirmCommand extends SubCommand {
@ -207,8 +203,8 @@ public class ConfirmCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Confirmation.Info.Message";
}
@Override
@ -220,9 +216,4 @@ public class ConfirmCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,19 +1,15 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.ControlPanel;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class ControlPanelCommand extends SubCommand {
@ -45,8 +41,8 @@ public class ControlPanelCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.ControlPanel.Info.Message";
}
@Override
@ -58,9 +54,4 @@ public class ControlPanelCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -23,6 +12,13 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class CoopCommand extends SubCommand {
@ -135,8 +131,8 @@ public class CoopCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Coop.Info.Message";
}
@Override
@ -148,9 +144,4 @@ public class CoopCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,16 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.List;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.cooldown.Cooldown;
@ -24,6 +14,12 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.structure.Structure;
import me.goodandevil.skyblock.utils.NumberUtil;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.List;
public class CreateCommand extends SubCommand {
@ -117,8 +113,8 @@ public class CreateCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Create.Info.Message";
}
@Override
@ -130,9 +126,4 @@ public class CreateCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,16 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerData;
@ -18,6 +8,12 @@ import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class CurrentCommand extends SubCommand {
@ -121,8 +117,8 @@ public class CurrentCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Current.Info.Message";
}
@Override
@ -134,9 +130,4 @@ public class CurrentCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.confirmation.Confirmation;
@ -21,13 +12,17 @@ import me.goodandevil.skyblock.playerdata.PlayerData;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.ChatComponent;
import me.goodandevil.skyblock.utils.version.Sounds;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class DeleteCommand extends SubCommand {
@ -142,8 +137,8 @@ public class DeleteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Delete.Info.Message";
}
@Override
@ -155,9 +150,4 @@ public class DeleteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,18 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -21,6 +9,14 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.Set;
import java.util.UUID;
public class DemoteCommand extends SubCommand {
@ -115,8 +111,8 @@ public class DemoteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Demote.Info.Message";
}
@Override
@ -128,9 +124,4 @@ public class DemoteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,22 +1,18 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.invite.Invite;
import me.goodandevil.skyblock.invite.InviteManager;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class DenyCommand extends SubCommand {
@ -74,8 +70,8 @@ public class DenyCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Deny.Info.Message";
}
@Override
@ -87,9 +83,4 @@ public class DenyCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.IslandManager;
import me.goodandevil.skyblock.menus.Information;
@ -21,6 +10,13 @@ import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class InformationCommand extends SubCommand {
@ -100,8 +96,8 @@ public class InformationCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Information.Info.Message";
}
@Override
@ -113,9 +109,4 @@ public class InformationCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,18 +1,8 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.api.event.island.IslandInviteEvent;
import me.goodandevil.skyblock.api.invite.IslandInvitation;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.invite.Invite;
@ -23,13 +13,18 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.ChatComponent;
import me.goodandevil.skyblock.utils.version.Sounds;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class InviteCommand extends SubCommand {
@ -251,8 +246,8 @@ public class InviteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Invite.Info.Message";
}
@Override
@ -264,9 +259,4 @@ public class InviteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,20 +1,8 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.api.event.island.IslandKickEvent;
import me.goodandevil.skyblock.api.utils.APIUtil;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -23,6 +11,14 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.Set;
import java.util.UUID;
public class KickAllCommand extends SubCommand {
@ -94,8 +90,8 @@ public class KickAllCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.KickAll.Info.Message";
}
@Override
@ -107,9 +103,4 @@ public class KickAllCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,22 +1,8 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.api.event.island.IslandKickEvent;
import me.goodandevil.skyblock.api.utils.APIUtil;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -31,6 +17,16 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.io.IOException;
import java.util.Set;
import java.util.UUID;
public class KickCommand extends SubCommand {
@ -264,8 +260,8 @@ public class KickCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Kick.Info.Message";
}
@Override
@ -277,9 +273,4 @@ public class KickCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,22 +1,18 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.menus.Leaderboard;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class LeaderboardCommand extends SubCommand {
@ -86,8 +82,8 @@ public class LeaderboardCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Leaderboard.Info.Message";
}
@Override
@ -99,9 +95,4 @@ public class LeaderboardCommand extends SubCommand {
public String[] getArguments() {
return new String[] { "level", "votes" };
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,19 +1,7 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.Set;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.api.event.player.PlayerIslandLeaveEvent;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -27,6 +15,14 @@ import me.goodandevil.skyblock.scoreboard.ScoreboardManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.Set;
import java.util.UUID;
public class LeaveCommand extends SubCommand {
@ -157,8 +153,8 @@ public class LeaveCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Leave.Info.Message";
}
@Override
@ -170,9 +166,4 @@ public class LeaveCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.cooldown.Cooldown;
import me.goodandevil.skyblock.cooldown.CooldownManager;
@ -28,6 +17,13 @@ import me.goodandevil.skyblock.utils.NumberUtil;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.visit.VisitManager;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class LevelCommand extends SubCommand {
@ -168,8 +164,8 @@ public class LevelCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Level.Info.Message";
}
@Override
@ -181,9 +177,4 @@ public class LevelCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,18 +1,14 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.menus.Members;
import me.goodandevil.skyblock.playerdata.PlayerData;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import java.io.File;
public class MembersCommand extends SubCommand {
@ -47,8 +43,8 @@ public class MembersCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Members.Info.Message";
}
@Override
@ -60,9 +56,4 @@ public class MembersCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class OpenCommand extends SubCommand {
@ -63,8 +59,8 @@ public class OpenCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Open.Info.Message";
}
@Override
@ -76,9 +72,4 @@ public class OpenCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.confirmation.Confirmation;
@ -30,13 +19,19 @@ import me.goodandevil.skyblock.utils.ChatComponent;
import me.goodandevil.skyblock.utils.NumberUtil;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.chat.ComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class OwnerCommand extends SubCommand {
@ -262,8 +257,8 @@ public class OwnerCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Ownership.Info.Message";
}
@Override
@ -275,9 +270,4 @@ public class OwnerCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,8 +1,5 @@
package me.goodandevil.skyblock.command.commands.island;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -144,8 +141,8 @@ public class PromoteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Promote.Info.Message";
}
@Override
@ -157,9 +154,4 @@ public class PromoteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class PublicCommand extends SubCommand {
@ -65,8 +61,8 @@ public class PublicCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Public.Info.Message";
}
@Override
@ -78,9 +74,4 @@ public class PublicCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,7 +1,14 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.*;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Materials;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.command.ConsoleCommandSender;
@ -10,22 +17,7 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scheduler.BukkitRunnable;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandEnvironment;
import me.goodandevil.skyblock.island.IslandManager;
import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.island.IslandWorld;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Materials;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.utils.world.LocationUtil;
import java.io.File;
public class SetSpawnCommand extends SubCommand {
@ -176,8 +168,8 @@ public class SetSpawnCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.SetSpawn.Info.Message";
}
@Override
@ -189,9 +181,4 @@ public class SetSpawnCommand extends SubCommand {
public String[] getArguments() {
return new String[] { "main", "visitor" };
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.island.IslandRole;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class SettingsCommand extends SubCommand {
@ -65,8 +61,8 @@ public class SettingsCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Settings.Info.Message";
}
@Override
@ -78,9 +74,4 @@ public class SettingsCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,28 +1,24 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandEnvironment;
import me.goodandevil.skyblock.island.IslandManager;
import me.goodandevil.skyblock.island.IslandWorld;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerDataManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.visit.VisitManager;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class TeleportCommand extends SubCommand {
@ -145,8 +141,8 @@ public class TeleportCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Teleport.Info.Message";
}
@Override
@ -158,9 +154,4 @@ public class TeleportCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,18 +1,7 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.ban.Ban;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -22,6 +11,13 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class UnbanCommand extends SubCommand {
@ -109,15 +105,8 @@ public class UnbanCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
}
@Override
public SubCommand setInfo(String info) {
this.info = info;
return this;
public String getInfoMessagePath() {
return "Command.Island.Unban.Info.Message";
}
@Override
@ -129,9 +118,4 @@ public class UnbanCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,7 +1,5 @@
package me.goodandevil.skyblock.command.commands.island;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
@ -12,7 +10,6 @@ import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.apache.commons.lang.WordUtils;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
@ -95,8 +92,8 @@ public class UnlockCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Unlock.Info.Message";
}
@Override
@ -108,9 +105,4 @@ public class UnlockCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return Type.Default;
}
}

View File

@ -1,20 +1,16 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.menus.Upgrade;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class UpgradeCommand extends SubCommand {
@ -54,8 +50,8 @@ public class UpgradeCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Upgrade.Info.Message";
}
@Override
@ -67,9 +63,4 @@ public class UpgradeCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,16 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.levelling.LevellingManager;
@ -21,6 +11,12 @@ import me.goodandevil.skyblock.utils.NumberUtil;
import me.goodandevil.skyblock.utils.version.Materials;
import me.goodandevil.skyblock.utils.version.NMSUtil;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.apache.commons.lang3.text.WordUtils;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class ValueCommand extends SubCommand {
@ -84,8 +80,8 @@ public class ValueCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Value.Info.Message";
}
@Override
@ -97,9 +93,4 @@ public class ValueCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,21 +1,16 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.menus.Visit;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.playerdata.PlayerData;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import java.io.File;
public class VisitCommand extends SubCommand {
@ -57,8 +52,8 @@ public class VisitCommand extends SubCommand {
}
@Override
public String getInfo() {
return this.info;
public String getInfoMessagePath() {
return "Command.Island.Visit.Info.Message";
}
@Override
@ -70,9 +65,4 @@ public class VisitCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,12 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -14,9 +8,11 @@ import me.goodandevil.skyblock.menus.Visitors;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class VisitorsCommand extends SubCommand {
@ -57,8 +53,8 @@ public class VisitorsCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Visitors.Info.Message";
}
@Override
@ -70,9 +66,4 @@ public class VisitorsCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,17 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
@ -24,6 +13,13 @@ import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.player.OfflinePlayer;
import me.goodandevil.skyblock.utils.version.Sounds;
import me.goodandevil.skyblock.visit.VisitManager;
import org.bukkit.Bukkit;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
import java.util.UUID;
public class VoteCommand extends SubCommand {
@ -133,8 +129,8 @@ public class VoteCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Vote.Info.Message";
}
@Override
@ -146,9 +142,4 @@ public class VoteCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
import me.goodandevil.skyblock.island.IslandRole;
@ -17,6 +8,11 @@ import me.goodandevil.skyblock.menus.Weather;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class WeatherCommand extends SubCommand {
@ -56,8 +52,8 @@ public class WeatherCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Weather.Info.Message";
}
@Override
@ -69,9 +65,4 @@ public class WeatherCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island.disabled;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.confirmation.Confirmation;
@ -25,6 +16,11 @@ import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.chat.ClickEvent;
import net.md_5.bungee.api.chat.ComponentBuilder;
import net.md_5.bungee.api.chat.HoverEvent;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class ResetCommand extends SubCommand {
@ -88,8 +84,8 @@ public class ResetCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Reset.Info.Message";
}
@Override
@ -101,9 +97,4 @@ public class ResetCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}

View File

@ -1,15 +1,6 @@
package me.goodandevil.skyblock.command.commands.island.disabled;
import java.io.File;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import me.goodandevil.skyblock.SkyBlock;
import me.goodandevil.skyblock.command.CommandManager;
import me.goodandevil.skyblock.command.SubCommand;
import me.goodandevil.skyblock.command.CommandManager.Type;
import me.goodandevil.skyblock.config.FileManager.Config;
import me.goodandevil.skyblock.island.Island;
import me.goodandevil.skyblock.island.IslandManager;
@ -18,6 +9,11 @@ import me.goodandevil.skyblock.menus.Rollback;
import me.goodandevil.skyblock.message.MessageManager;
import me.goodandevil.skyblock.sound.SoundManager;
import me.goodandevil.skyblock.utils.version.Sounds;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import java.io.File;
public class RollbackCommand extends SubCommand {
@ -55,8 +51,8 @@ public class RollbackCommand extends SubCommand {
}
@Override
public String getInfo() {
return info;
public String getInfoMessagePath() {
return "Command.Island.Rollback.Info.Message";
}
@Override
@ -68,9 +64,4 @@ public class RollbackCommand extends SubCommand {
public String[] getArguments() {
return new String[0];
}
@Override
public Type getType() {
return CommandManager.Type.Default;
}
}