From ea8f76493141717296e1f59fbdab21c39f1937be Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Fri, 13 May 2022 21:17:46 -0400 Subject: refactor and encapsulate classes --- .../command/location/util/Locations.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java b/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java new file mode 100644 index 0000000..bde5456 --- /dev/null +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/location/util/Locations.java @@ -0,0 +1,27 @@ +package net.tylermurphy.hideAndSeek.command.location.util; + +public enum Locations { + + GAME("spawns.game", "GAME_SPAWN"), + LOBBY("spawns.lobby", "LOBBY_SPAWN"), + EXIT("spawns.exit", "EXIT_SPAWN"); + + private final String path, message; + Locations(String path, String message) { + this.path = path; + this.message = message; + } + + public String message() { + return message; + } + + public String path() { + return path; + } + + public String path(String additive) { + return path + "." + additive; + } + +} \ No newline at end of file -- cgit v1.2.3-freya