diff --git a/.project b/.project
new file mode 100644
index 0000000..12a14d4
--- /dev/null
+++ b/.project
@@ -0,0 +1,34 @@
+
+
+ KenshinsHideAndSeek
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
+
+ 1690577727676
+
+ 30
+
+ org.eclipse.core.resources.regexFilterMatcher
+ node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__
+
+
+
+
diff --git a/pom.xml b/pom.xml
index 0515362..90ee803 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,7 +1,7 @@
4.0.0
- net.tylermurphy
+ dev.tylerm
KenshinsHideAndSeek
- 1.7.4
+ 1.7.5
Hide and Seek Plugin
@@ -27,11 +27,11 @@
com.cryptomorin.xseries
- net.tylermurphy.dependencies.xseries
+ dev.tylerm.depend.xseries
com.zaxxer.hikari
- net.tylermurphy.dependencies.hikari
+ dev.tylerm.depend.hikari
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/Main.java b/src/main/java/dev/tylerm/khs/Main.java
similarity index 84%
rename from src/main/java/net/tylermurphy/hideAndSeek/Main.java
rename to src/main/java/dev/tylerm/khs/Main.java
index be1c445..bb69c99 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/Main.java
+++ b/src/main/java/dev/tylerm/khs/Main.java
@@ -1,18 +1,24 @@
-package net.tylermurphy.hideAndSeek;
+package dev.tylerm.khs;
-import net.tylermurphy.hideAndSeek.command.*;
-import net.tylermurphy.hideAndSeek.command.map.*;
-import net.tylermurphy.hideAndSeek.command.map.blockhunt.Enabled;
-import net.tylermurphy.hideAndSeek.command.map.set.*;
-import net.tylermurphy.hideAndSeek.command.world.Create;
-import net.tylermurphy.hideAndSeek.command.world.Delete;
-import net.tylermurphy.hideAndSeek.command.world.Tp;
-import net.tylermurphy.hideAndSeek.configuration.*;
-import net.tylermurphy.hideAndSeek.database.Database;
-import net.tylermurphy.hideAndSeek.game.*;
-import net.tylermurphy.hideAndSeek.command.util.CommandGroup;
-import net.tylermurphy.hideAndSeek.game.listener.*;
-import net.tylermurphy.hideAndSeek.util.PAPIExpansion;
+import dev.tylerm.khs.command.*;
+import dev.tylerm.khs.command.map.Debug;
+import dev.tylerm.khs.command.map.GoTo;
+import dev.tylerm.khs.command.map.Save;
+import dev.tylerm.khs.command.map.blockhunt.blocks.Add;
+import dev.tylerm.khs.command.map.blockhunt.blocks.List;
+import dev.tylerm.khs.command.map.blockhunt.blocks.Remove;
+import dev.tylerm.khs.command.map.set.*;
+import dev.tylerm.khs.configuration.*;
+import dev.tylerm.khs.game.*;
+import dev.tylerm.khs.game.listener.*;
+import dev.tylerm.khs.game.util.Status;
+import dev.tylerm.khs.util.PAPIExpansion;
+import dev.tylerm.khs.command.map.blockhunt.Enabled;
+import dev.tylerm.khs.command.world.Create;
+import dev.tylerm.khs.command.world.Delete;
+import dev.tylerm.khs.command.world.Tp;
+import dev.tylerm.khs.database.Database;
+import dev.tylerm.khs.command.util.CommandGroup;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -27,8 +33,8 @@ import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static net.tylermurphy.hideAndSeek.configuration.Config.*;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.*;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Main extends JavaPlugin implements Listener {
@@ -94,9 +100,9 @@ public class Main extends JavaPlugin implements Listener {
new CommandGroup("map",
new CommandGroup("blockhunt",
new CommandGroup("blocks",
- new net.tylermurphy.hideAndSeek.command.map.blockhunt.blocks.Add(),
- new net.tylermurphy.hideAndSeek.command.map.blockhunt.blocks.Remove(),
- new net.tylermurphy.hideAndSeek.command.map.blockhunt.blocks.List()
+ new Add(),
+ new Remove(),
+ new List()
),
new Enabled()
),
@@ -107,10 +113,13 @@ public class Main extends JavaPlugin implements Listener {
new Border(),
new Bounds()
),
- new Add(),
- new Remove(),
- new List(),
- new Status(),
+ new CommandGroup("unset",
+ new dev.tylerm.khs.command.map.unset.Border()
+ ),
+ new dev.tylerm.khs.command.map.Add(),
+ new dev.tylerm.khs.command.map.Remove(),
+ new dev.tylerm.khs.command.map.List(),
+ new dev.tylerm.khs.command.map.Status(),
new Save(),
new Debug(),
new GoTo()
@@ -118,7 +127,7 @@ public class Main extends JavaPlugin implements Listener {
new CommandGroup("world",
new Create(),
new Delete(),
- new net.tylermurphy.hideAndSeek.command.world.List(),
+ new dev.tylerm.khs.command.world.List(),
new Tp()
),
new SetExitLocation(),
@@ -170,7 +179,7 @@ public class Main extends JavaPlugin implements Listener {
}
private void onTick() {
- if(game.getStatus() == net.tylermurphy.hideAndSeek.game.util.Status.ENDED) game = new Game(game.getCurrentMap(), board);
+ if(game.getStatus() == Status.ENDED) game = new Game(game.getCurrentMap(), board);
game.onTick();
disguiser.check();
}
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Confirm.java b/src/main/java/dev/tylerm/khs/command/Confirm.java
similarity index 86%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Confirm.java
rename to src/main/java/dev/tylerm/khs/command/Confirm.java
index a25185d..9a13b72 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Confirm.java
+++ b/src/main/java/dev/tylerm/khs/command/Confirm.java
@@ -1,14 +1,14 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
+import dev.tylerm.khs.command.util.ICommand;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.*;
import java.util.function.Consumer;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Confirm implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java b/src/main/java/dev/tylerm/khs/command/Help.java
similarity index 87%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Help.java
rename to src/main/java/dev/tylerm/khs/command/Help.java
index 41db5a9..5dfd7e9 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Help.java
+++ b/src/main/java/dev/tylerm/khs/command/Help.java
@@ -1,8 +1,8 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.util.Pair;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.util.Pair;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -11,8 +11,8 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Help implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Join.java b/src/main/java/dev/tylerm/khs/command/Join.java
similarity index 77%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Join.java
rename to src/main/java/dev/tylerm/khs/command/Join.java
index 3e724fb..d8ba212 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Join.java
+++ b/src/main/java/dev/tylerm/khs/command/Join.java
@@ -1,15 +1,15 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.List;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Join implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Leave.java b/src/main/java/dev/tylerm/khs/command/Leave.java
similarity index 77%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Leave.java
rename to src/main/java/dev/tylerm/khs/command/Leave.java
index 109930b..dc485b6 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Leave.java
+++ b/src/main/java/dev/tylerm/khs/command/Leave.java
@@ -1,15 +1,15 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.List;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Leave implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java b/src/main/java/dev/tylerm/khs/command/Reload.java
similarity index 66%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
rename to src/main/java/dev/tylerm/khs/command/Reload.java
index 0c2b6b1..098af6f 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
+++ b/src/main/java/dev/tylerm/khs/command/Reload.java
@@ -1,17 +1,17 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.configuration.*;
-import net.tylermurphy.hideAndSeek.game.util.Status;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.configuration.*;
+import dev.tylerm.khs.game.util.Status;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.List;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Config.messagePrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Config.messagePrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Reload implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Send.java b/src/main/java/dev/tylerm/khs/command/Send.java
similarity index 60%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Send.java
rename to src/main/java/dev/tylerm/khs/command/Send.java
index 43620c5..6c8d449 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Send.java
+++ b/src/main/java/dev/tylerm/khs/command/Send.java
@@ -1,41 +1,40 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.configuration.Map;
-import net.tylermurphy.hideAndSeek.configuration.Maps;
-import net.tylermurphy.hideAndSeek.game.util.Status;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.configuration.Config;
+import dev.tylerm.khs.configuration.Localization;
+import dev.tylerm.khs.configuration.Map;
+import dev.tylerm.khs.configuration.Maps;
+import dev.tylerm.khs.game.util.Status;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import java.util.stream.Collectors;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
-
public class Send implements ICommand {
public void execute(Player sender, String[] args) {
if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
- sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
+ sender.sendMessage(Config.errorPrefix + Localization.message("GAME_INPROGRESS"));
return;
}
Map map = Maps.getMap(args[0]);
if(map == null) {
- sender.sendMessage(errorPrefix + message("INVALID_MAP"));
+ sender.sendMessage(Config.errorPrefix + Localization.message("INVALID_MAP"));
return;
}
if(map.isNotSetup()){
- sender.sendMessage(errorPrefix + message("MAP_NOT_SETUP"));
+ sender.sendMessage(Config.errorPrefix + Localization.message("MAP_NOT_SETUP"));
return;
}
if (!Main.getInstance().getBoard().contains(sender)) {
- sender.sendMessage(errorPrefix + message("GAME_NOT_INGAME"));
+ sender.sendMessage(Config.errorPrefix + Localization.message("GAME_NOT_INGAME"));
return;
}
@@ -61,7 +60,7 @@ public class Send implements ICommand {
public List autoComplete(@NotNull String parameter, @NotNull String typed) {
if(parameter.equals("map")) {
- return Maps.getAllMaps().stream().filter(map -> !map.isNotSetup()).map(net.tylermurphy.hideAndSeek.configuration.Map::getName).collect(Collectors.toList());
+ return Maps.getAllMaps().stream().filter(map -> !map.isNotSetup()).map(Map::getName).collect(Collectors.toList());
}
return null;
}
diff --git a/src/main/java/dev/tylerm/khs/command/SetExitLocation.java b/src/main/java/dev/tylerm/khs/command/SetExitLocation.java
new file mode 100644
index 0000000..9849f81
--- /dev/null
+++ b/src/main/java/dev/tylerm/khs/command/SetExitLocation.java
@@ -0,0 +1,42 @@
+package dev.tylerm.khs.command;
+
+import dev.tylerm.khs.command.location.LocationUtils;
+import dev.tylerm.khs.command.location.Locations;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.configuration.Config;
+import dev.tylerm.khs.util.Location;
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.List;
+
+public class SetExitLocation implements ICommand {
+
+ public void execute(Player sender, String[] args) {
+ LocationUtils.setLocation(sender, Locations.EXIT, null, map -> {
+ Config.addToConfig("exit.x", sender.getLocation().getBlockX());
+ Config.addToConfig("exit.y", sender.getLocation().getBlockY());
+ Config.addToConfig("exit.z", sender.getLocation().getBlockZ());
+ Config.addToConfig("exit.world", sender.getLocation().getWorld().getName());
+ Config.exitPosition = Location.from(sender);
+ Config.saveConfig();
+ });
+ }
+
+ public String getLabel() {
+ return "setexit";
+ }
+
+ public String getUsage() {
+ return "";
+ }
+
+ public String getDescription() {
+ return "Sets the plugins exit location";
+ }
+
+ public List autoComplete(@NotNull String parameter, @NotNull String typed) {
+ return null;
+ }
+
+}
diff --git a/src/main/java/dev/tylerm/khs/command/Start.java b/src/main/java/dev/tylerm/khs/command/Start.java
new file mode 100644
index 0000000..0a75855
--- /dev/null
+++ b/src/main/java/dev/tylerm/khs/command/Start.java
@@ -0,0 +1,77 @@
+package dev.tylerm.khs.command;
+
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.game.util.Status;
+import org.bukkit.Bukkit;
+import org.bukkit.entity.Player;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static dev.tylerm.khs.configuration.Config.*;
+import static dev.tylerm.khs.configuration.Localization.message;
+
+public class Start implements ICommand {
+
+ public void execute(Player sender, String[] args) {
+ if (Main.getInstance().getGame().checkCurrentMap()) {
+ sender.sendMessage(errorPrefix + message("GAME_SETUP"));
+ return;
+ }
+ if (Main.getInstance().getGame().getStatus() != Status.STANDBY) {
+ sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
+ return;
+ }
+ if (!Main.getInstance().getBoard().contains(sender)) {
+ sender.sendMessage(errorPrefix + message("GAME_NOT_INGAME"));
+ return;
+ }
+ if (Main.getInstance().getBoard().size() < minPlayers) {
+ sender.sendMessage(errorPrefix + message("START_MIN_PLAYERS").addAmount(minPlayers));
+ return;
+ }
+
+ if (args.length < 1) {
+ Main.getInstance().getGame().start();
+ return;
+ };
+
+ List initialSeekers = new ArrayList<>();
+ for (int i = 0; i < args.length; i++) {
+ Player seeker = Bukkit.getPlayer(args[i]);
+ if (seeker == null || !Main.getInstance().getBoard().contains(seeker) || initialSeekers.contains(seeker)) {
+ sender.sendMessage(errorPrefix + message("START_INVALID_NAME").addPlayer(args[i]));
+ return;
+ }
+ initialSeekers.add(seeker);
+ }
+
+ int minHiders = minPlayers - startingSeekerCount;
+ if (Main.getInstance().getBoard().size() - initialSeekers.size() < minHiders) {
+ sender.sendMessage(errorPrefix + message("START_MIN_PLAYERS").addAmount(minPlayers));
+ return;
+ }
+
+ Main.getInstance().getGame().start(initialSeekers);
+ }
+
+ public String getLabel() {
+ return "start";
+ }
+
+ public String getUsage() {
+ return "<*seekers...>";
+ }
+
+ public String getDescription() {
+ return "Starts the game either with a random set of seekers or a chosen list";
+ }
+
+ public List autoComplete(@NotNull String parameter, @NotNull String typed) {
+ return Main.getInstance().getBoard().getPlayers().stream().map(Player::getName).collect(Collectors.toList());
+ }
+
+}
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java b/src/main/java/dev/tylerm/khs/command/Stop.java
similarity index 68%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java
rename to src/main/java/dev/tylerm/khs/command/Stop.java
index 498e30d..557e147 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java
+++ b/src/main/java/dev/tylerm/khs/command/Stop.java
@@ -1,16 +1,16 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.game.util.Status;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.game.util.Status;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.List;
-import static net.tylermurphy.hideAndSeek.configuration.Config.abortPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.abortPrefix;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Stop implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Top.java b/src/main/java/dev/tylerm/khs/command/Top.java
similarity index 86%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Top.java
rename to src/main/java/dev/tylerm/khs/command/Top.java
index 13f3069..27a438c 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Top.java
+++ b/src/main/java/dev/tylerm/khs/command/Top.java
@@ -1,8 +1,8 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.database.util.PlayerInfo;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.database.util.PlayerInfo;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -10,8 +10,8 @@ import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.List;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
+import static dev.tylerm.khs.configuration.Config.errorPrefix;
+import static dev.tylerm.khs.configuration.Localization.message;
public class Top implements ICommand {
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Wins.java b/src/main/java/dev/tylerm/khs/command/Wins.java
similarity index 77%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/Wins.java
rename to src/main/java/dev/tylerm/khs/command/Wins.java
index fb61fb2..2a7f046 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Wins.java
+++ b/src/main/java/dev/tylerm/khs/command/Wins.java
@@ -1,8 +1,10 @@
-package net.tylermurphy.hideAndSeek.command;
+package dev.tylerm.khs.command;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.command.util.ICommand;
-import net.tylermurphy.hideAndSeek.database.util.PlayerInfo;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.command.util.ICommand;
+import dev.tylerm.khs.configuration.Config;
+import dev.tylerm.khs.configuration.Localization;
+import dev.tylerm.khs.database.util.PlayerInfo;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
@@ -11,9 +13,6 @@ import java.util.Collections;
import java.util.List;
import java.util.UUID;
-import static net.tylermurphy.hideAndSeek.configuration.Config.errorPrefix;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
-
public class Wins implements ICommand {
public void execute(Player sender, String[] args) {
@@ -30,16 +29,16 @@ public class Wins implements ICommand {
uuid = Main.getInstance().getDatabase().getNameData().getUUID(args[0]);
}
if(uuid == null){
- sender.sendMessage(errorPrefix + message("START_INVALID_NAME").addPlayer(args[0]));
+ sender.sendMessage(Config.errorPrefix + Localization.message("START_INVALID_NAME").addPlayer(args[0]));
return;
}
PlayerInfo info = Main.getInstance().getDatabase().getGameData().getInfo(uuid);
if (info == null) {
- sender.sendMessage(errorPrefix + message("NO_GAME_INFO"));
+ sender.sendMessage(Config.errorPrefix + Localization.message("NO_GAME_INFO"));
return;
}
String message = ChatColor.WHITE + "" + ChatColor.BOLD + "==============================\n";
- message = message + message("INFORMATION_FOR").addPlayer(name) + "\n";
+ message = message + Localization.message("INFORMATION_FOR").addPlayer(name) + "\n";
message = message + "==============================\n";
message = message + String.format("%sTOTAL WINS: %s%s\n%sHIDER WINS: %s%s\n%sSEEKER WINS: %s%s\n%sGAMES PLAYED: %s",
ChatColor.YELLOW, ChatColor.WHITE, info.getSeekerWins() +info.getHiderWins(), ChatColor.GOLD, ChatColor.WHITE, info.getHiderWins(),
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java b/src/main/java/dev/tylerm/khs/command/location/LocationUtils.java
similarity index 55%
rename from src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
rename to src/main/java/dev/tylerm/khs/command/location/LocationUtils.java
index 5e4afb5..8c8e3f7 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/location/LocationUtils.java
+++ b/src/main/java/dev/tylerm/khs/command/location/LocationUtils.java
@@ -1,17 +1,16 @@
-package net.tylermurphy.hideAndSeek.command.location;
+package dev.tylerm.khs.command.location;
-import net.tylermurphy.hideAndSeek.Main;
-import net.tylermurphy.hideAndSeek.configuration.Map;
-import net.tylermurphy.hideAndSeek.configuration.Maps;
-import net.tylermurphy.hideAndSeek.game.util.Status;
+import dev.tylerm.khs.Main;
+import dev.tylerm.khs.configuration.Config;
+import dev.tylerm.khs.configuration.Localization;
+import dev.tylerm.khs.configuration.Map;
+import dev.tylerm.khs.configuration.Maps;
+import dev.tylerm.khs.game.util.Status;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.function.Consumer;
-import static net.tylermurphy.hideAndSeek.configuration.Config.*;
-import static net.tylermurphy.hideAndSeek.configuration.Localization.message;
-
/**
* @author bobby29831
*/
@@ -20,12 +19,12 @@ public class LocationUtils {
public static void setLocation(@NotNull Player player, @NotNull Locations place, String mapName, @NotNull Consumer