Splits the two types of configuration keys
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package net.knarcraft.blockhunt.command;
|
||||
|
||||
import net.knarcraft.blockhunt.BlockHunt;
|
||||
import net.knarcraft.blockhunt.ConfigC;
|
||||
import net.knarcraft.blockhunt.MemoryStorage;
|
||||
import net.knarcraft.blockhunt.ScoreboardHandler;
|
||||
import net.knarcraft.blockhunt.arena.Arena;
|
||||
import net.knarcraft.blockhunt.arena.ArenaState;
|
||||
import net.knarcraft.blockhunt.config.MessageKey;
|
||||
import net.knarcraft.blockhunt.manager.MessageManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -19,7 +19,7 @@ public class CreateCommand extends DefaultCommand {
|
||||
public boolean execute(Player player, Command cmd, String label, String[] args) {
|
||||
if (player != null) {
|
||||
if (args.length <= 1) {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_notEnoughArguments, "syntax-" + BlockHunt.CMDCreate.usage);
|
||||
MessageManager.sendFMessage(player, MessageKey.ERROR_NOT_ENOUGH_ARGUMENTS, "syntax-" + BlockHunt.CMDCreate.usage);
|
||||
} else {
|
||||
if (MemoryStorage.pos1.get(player) != null && MemoryStorage.pos2.get(player) != null) {
|
||||
if (MemoryStorage.pos1.get(player).getWorld().equals(MemoryStorage.pos2.get(player).getWorld())) {
|
||||
@@ -33,12 +33,12 @@ public class CreateCommand extends DefaultCommand {
|
||||
MemoryStorage.arenaList.add(arena);
|
||||
ScoreboardHandler.createScoreboard(arena);
|
||||
|
||||
MessageManager.sendFMessage(player, ConfigC.normal_createCreatedArena, "name-" + args[1]);
|
||||
MessageManager.sendFMessage(player, MessageKey.NORMAL_CREATE_CREATED_ARENA, "name-" + args[1]);
|
||||
} else {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_createNotSameWorld);
|
||||
MessageManager.sendFMessage(player, MessageKey.ERROR_CREATE_NOT_SAME_WORLD);
|
||||
}
|
||||
} else {
|
||||
MessageManager.sendFMessage(player, ConfigC.error_createSelectionFirst);
|
||||
MessageManager.sendFMessage(player, MessageKey.ERROR_CREATE_SELECTION_FIRST);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user