From af4071c5822ace726659f9f1fe72ddf2e5934c3d Mon Sep 17 00:00:00 2001 From: Steven Lawson Date: Thu, 15 Aug 2013 17:40:35 -0400 Subject: [PATCH] Framework for new adminworld commands. --- .../Commands/Command_adminworld.java | 102 ++++++++++++++++-- 1 file changed, 94 insertions(+), 8 deletions(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java index 9f3fd4e6..f15a1767 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_adminworld.java @@ -1,27 +1,113 @@ package me.StevenLawson.TotalFreedomMod.Commands; import me.StevenLawson.TotalFreedomMod.TFM_AdminWorld; +import me.StevenLawson.TotalFreedomMod.TFM_Util; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = AdminLevel.SUPER, source = SourceType.ONLY_IN_GAME) -@CommandParameters(description = "Go to the AdminWorld.", usage = "/") +@CommandPermissions(level = AdminLevel.OP, source = SourceType.ONLY_IN_GAME) +@CommandParameters(description = "Go to the AdminWorld.", usage = "/ [guest < list | add | remove > | time ]") public class Command_adminworld extends TFM_Command { + private enum CommandMode + { + TELEPORT, GUEST, TIME + } + @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - if (sender_p.getWorld() == TFM_AdminWorld.getInstance().getAdminWorld()) + CommandMode commandMode = null; + + /* + * + * /adminworld + * + * /adminworld guest list + * /adminworld guest remove + * /adminworld guest add + * + * /adminworld time