mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-18 00:05:21 +01:00
Reenable reload command but add a warning message
This commit is contained in:
parent
69e30ef992
commit
80b856f7c0
@ -91,6 +91,7 @@ public class CommandManager implements CommandExecutor, TabCompleter {
|
||||
new me.goodandevil.skyblock.command.commands.admin.OwnerCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.RemoveHologramCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.RemoveUpgradeCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.ReloadCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.SetHologramCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.SetSizeCommand(),
|
||||
new me.goodandevil.skyblock.command.commands.admin.SetSpawnCommand(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
package me.goodandevil.skyblock.command.commands.admin.disabled;
|
||||
package me.goodandevil.skyblock.command.commands.admin;
|
||||
|
||||
import me.goodandevil.skyblock.command.SubCommand;
|
||||
import me.goodandevil.skyblock.config.FileManager;
|
||||
@ -39,6 +39,12 @@ public class ReloadCommand extends SubCommand {
|
||||
SoundManager soundManager = skyblock.getSoundManager();
|
||||
FileManager fileManager = skyblock.getFileManager();
|
||||
|
||||
messageManager.sendMessage(sender, "&cPlease note that this command is not supported and may" +
|
||||
"cause issues that will make the status of the plugin unrecoverable. " +
|
||||
"If you encounter any issues please stop your server, edit the configuration files, " +
|
||||
"and then start your server again. This command does NOT reload all the plugin files, only " +
|
||||
"the config.yml, language.yml, generators.yml, and levelling.yml.");
|
||||
|
||||
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
|
@ -28,7 +28,6 @@ public class CurrentCommand extends SubCommand {
|
||||
|
||||
if (args.length > 0) {
|
||||
if (!args[0].equalsIgnoreCase(player.getName())) {
|
||||
if (player.hasPermission("fabledskyblock.current") || player.hasPermission("fabledskyblock.*")) {
|
||||
if (args.length == 1) {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
|
||||
|
||||
@ -71,13 +70,6 @@ public class CurrentCommand extends SubCommand {
|
||||
configLoad.getString("Command.Island.Current.Invalid.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Current.Permission.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ public class InformationCommand extends SubCommand {
|
||||
UUID islandOwnerUUID = null;
|
||||
|
||||
if (args.length == 1) {
|
||||
if (player.hasPermission("fabledskyblock.information") || player.hasPermission("fabledskyblock.*")) {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
|
||||
|
||||
if (targetPlayer == null) {
|
||||
@ -49,13 +48,6 @@ public class InformationCommand extends SubCommand {
|
||||
configLoad.getString("Command.Island.Information.Island.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player,
|
||||
configLoad.getString("Command.Island.Information.Permission.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length != 0) {
|
||||
|
@ -41,7 +41,6 @@ public class LevelCommand extends SubCommand {
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
|
||||
if (args.length == 1) {
|
||||
if (player.hasPermission("fabledskyblock.level") || player.hasPermission("fabledskyblock.*")) {
|
||||
Player targetPlayer = Bukkit.getServer().getPlayer(args[0]);
|
||||
UUID islandOwnerUUID = null;
|
||||
String targetPlayerName;
|
||||
@ -78,12 +77,6 @@ public class LevelCommand extends SubCommand {
|
||||
configLoad.getString("Command.Island.Level.Owner.Other.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Level.Permission.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
|
||||
return;
|
||||
}
|
||||
} else if (args.length != 0) {
|
||||
|
@ -31,7 +31,6 @@ public class ValueCommand extends SubCommand {
|
||||
Config config = fileManager.getConfig(new File(skyblock.getDataFolder(), "language.yml"));
|
||||
FileConfiguration configLoad = config.getFileConfiguration();
|
||||
|
||||
if (player.hasPermission("fabledskyblock.value") || player.hasPermission("fabledskyblock.*")) {
|
||||
if (player.getItemInHand() == null) {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Value.Hand.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
@ -63,10 +62,6 @@ public class ValueCommand extends SubCommand {
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
messageManager.sendMessage(player, configLoad.getString("Command.Island.Value.Permission.Message"));
|
||||
soundManager.playSound(player, Sounds.ANVIL_LAND.bukkitSound(), 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user