summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
diff options
context:
space:
mode:
authorTyler Murphy <tylermurphy534@gmail.com>2021-10-22 20:03:15 -0400
committerTyler Murphy <tylermurphy534@gmail.com>2021-10-22 20:03:15 -0400
commit0015592730f936350718ec61cd522c6dea3fe9c1 (patch)
treea148bfa82386a390bb9ee1d9960dc45ed9145640 /src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
parent1.3.0 final beta (diff)
downloadkenshinshideandseek-0015592730f936350718ec61cd522c6dea3fe9c1.tar.gz
kenshinshideandseek-0015592730f936350718ec61cd522c6dea3fe9c1.tar.bz2
kenshinshideandseek-0015592730f936350718ec61cd522c6dea3fe9c1.zip
localization
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
index 1580f3f..8be0141 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Setup.java
@@ -2,42 +2,41 @@ package net.tylermurphy.hideAndSeek.command;
import org.bukkit.command.CommandSender;
-import net.md_5.bungee.api.ChatColor;
import net.tylermurphy.hideAndSeek.Main;
-import static net.tylermurphy.hideAndSeek.Config.*;
+import static net.tylermurphy.hideAndSeek.configuration.Config.*;
import java.io.File;
+import static net.tylermurphy.hideAndSeek.configuration.Localization.*;
public class Setup implements ICommand {
public void execute(CommandSender sender, String[] args) {
- String message = String.format("%s%sThe following is needed for setup...", ChatColor.WHITE, ChatColor.BOLD);
+ String msg = message("SETUP").toString();
int count = 0;
if(spawnPosition.getBlockX() == 0 && spawnPosition.getBlockY() == 0 && spawnPosition.getBlockZ() == 0) {
- message = String.format("%s\n%s%s-%s%s", message, ChatColor.RED, ChatColor.BOLD, ChatColor.WHITE, "Game spawn isnt set, /hs setspawn");
+ msg = msg + "\n" + message("SETUP_GAME").toString();
count++;
}
if(lobbyPosition.getBlockX() == 0 && lobbyPosition.getBlockY() == 0 && lobbyPosition.getBlockZ() == 0) {
- message = String.format("%s\n%s%s-%s%s", message, ChatColor.RED, ChatColor.BOLD, ChatColor.WHITE, "Lobby spawn isnt set, /hs setlobby");
- sender.sendMessage(errorPrefix + "Please set lobby location first");
+ msg = msg + "\n" + message("SETUP_LOBBY").toString();
count++;
}
if(exitPosition.getBlockX() == 0 && exitPosition.getBlockY() == 0 && exitPosition.getBlockZ() == 0) {
- message = String.format("%s\n%s%s-%s%s", message, ChatColor.RED, ChatColor.BOLD, ChatColor.WHITE, "Quit/exit teleport location isnt set, /hs setexit");
+ msg = msg + "\n" + message("SETUP_EXIT").toString();
count++;
}
File destenation = new File(Main.root+File.separator+"hideandseek_"+spawnWorld);
if(!destenation.exists()) {
- message = String.format("%s\n%s%s-%s%s", message, ChatColor.RED, ChatColor.BOLD, ChatColor.WHITE, "Hide and seek map isnt saved, /hs savemap (after /hs setspawn)");
+ msg = msg + "\n" + message("SETUP_MAPSAVE").toString();
count++;
}
if(count < 1) {
- sender.sendMessage(messagePrefix + "Everything is setup and ready to go!");
+ sender.sendMessage(messagePrefix + message("SETUP_COMPLETE"));
} else {
- sender.sendMessage(message);
+ sender.sendMessage(msg);
}
}