diff --git a/src/de/steamwar/lobby/LobbySystem.java b/src/de/steamwar/lobby/LobbySystem.java index 30064af..680b9ec 100644 --- a/src/de/steamwar/lobby/LobbySystem.java +++ b/src/de/steamwar/lobby/LobbySystem.java @@ -22,10 +22,13 @@ package de.steamwar.lobby; import de.steamwar.lobby.listener.Fightservers; import de.steamwar.lobby.listener.Join; import de.steamwar.lobby.listener.Portals; +import de.steamwar.message.Message; import org.bukkit.plugin.java.JavaPlugin; public class LobbySystem extends JavaPlugin { + // This should be treated as final! + public static Message MESSAGE; private static LobbySystem plugin; private static Config config; @@ -36,6 +39,8 @@ public class LobbySystem extends JavaPlugin { @Override public void onEnable() { + MESSAGE = new Message("de.steamwar.lobby.LobbySystem", getClassLoader()); + new Join(); new Fightservers(); new Portals(); diff --git a/src/de/steamwar/lobby/LobbySystem.properties b/src/de/steamwar/lobby/LobbySystem.properties new file mode 100644 index 0000000..b6d346e --- /dev/null +++ b/src/de/steamwar/lobby/LobbySystem.properties @@ -0,0 +1,9 @@ +PREFIX = §eLobby§8System§8» +TIME = HH:mm:ss +DATE=........ +COMMAND_HELP_HEAD=§7---=== (§e{0}§7) ===--- + +# Portal Command +PORTAL_COMMAND_LIST_HELP = §8/§7portal §elist §8- §7Listet alle Portale auf +PORTAL_COMMAND_ADD_HELP = §8/§7portal §ecreate §8[§7PortalType§8] §8[§7PortalName§8] §8- §7Fügt ein Portal hinzu +PORTAL_COMMAND_REMOVE_HELP = §8/§7portal §eremove §8[§7PortalName§8] §8- §7Entfernt ein Portal \ No newline at end of file diff --git a/src/de/steamwar/lobby/LobbySystem_en.properties b/src/de/steamwar/lobby/LobbySystem_en.properties new file mode 100644 index 0000000..e69de29 diff --git a/src/de/steamwar/lobby/command/PortalCommand.java b/src/de/steamwar/lobby/command/PortalCommand.java new file mode 100644 index 0000000..e678aea --- /dev/null +++ b/src/de/steamwar/lobby/command/PortalCommand.java @@ -0,0 +1,53 @@ +package de.steamwar.lobby.command; + +import de.steamwar.command.SWCommand; +import de.steamwar.lobby.LobbySystem; +import de.steamwar.lobby.listener.Portals; +import de.steamwar.sql.SteamwarUser; +import org.bukkit.entity.Player; + +public class PortalCommand extends SWCommand { + + protected PortalCommand(String command) { + super("portal"); + } + + private boolean noPermissions(Player player) { + SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId()); + return !steamwarUser.getUserGroup().isTeamGroup(); + } + + @Register(help = true) + public void genericHelp(Player player, String... args) { + if (noPermissions(player)) return; + LobbySystem.MESSAGE.sendPrefixless("COMMAND_HELP_HEAD", player, "portal"); + LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_LIST_HELP", player); + LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_ADD_HELP", player); + LobbySystem.MESSAGE.sendPrefixless("PORTAL_COMMAND_REMOVE_HELP", player); + } + + @Register("list") + public void portalList(Player player) { + // TODO: implement + } + + @Register({"create", "command"}) + public void portalAddCommand(Player player, String... command) { + + } + + @Register({"create", "fightserver"}) + public void portalAddFightserver(Player player) { + + } + + @Register({"create", "teleport"}) + public void portalAddTeleport(Player player, String portalName) { + + } + + @Register("remove") + public void portalRemove(Player player, String portalName) { + + } +}