diff --git a/src/de/craftinc/gates/Plugin.java b/src/de/craftinc/gates/Plugin.java index e67b406..91d4353 100644 --- a/src/de/craftinc/gates/Plugin.java +++ b/src/de/craftinc/gates/Plugin.java @@ -130,17 +130,17 @@ public class Plugin extends JavaPlugin // Add the commands commands.add(new CommandHelp()); - commands.add(new CommandCreate()); - commands.add(new CommandDelete()); - commands.add(new CommandSetLocation()); - commands.add(new CommandSetExit()); + commands.add(new CommandNew()); + commands.add(new CommandRemove()); + commands.add(new CommandLocation()); + commands.add(new CommandExit()); commands.add(new CommandOpen()); commands.add(new CommandRename()); commands.add(new CommandClose()); commands.add(new CommandList()); commands.add(new CommandInfo()); - commands.add(new CommandSetHidden()); - commands.add(new CommandSetVisible()); + commands.add(new CommandHide()); + commands.add(new CommandUnhide()); // Register events diff --git a/src/de/craftinc/gates/commands/CommandSetExit.java b/src/de/craftinc/gates/commands/CommandExit.java similarity index 95% rename from src/de/craftinc/gates/commands/CommandSetExit.java rename to src/de/craftinc/gates/commands/CommandExit.java index 9804fe9..05231ab 100644 --- a/src/de/craftinc/gates/commands/CommandSetExit.java +++ b/src/de/craftinc/gates/commands/CommandExit.java @@ -24,10 +24,9 @@ import org.bukkit.ChatColor; import de.craftinc.gates.Plugin; -public class CommandSetExit extends BaseCommand +public class CommandExit extends BaseCommand { - - public CommandSetExit() + public CommandExit() { aliases.add("exit"); aliases.add("e"); diff --git a/src/de/craftinc/gates/commands/CommandHelp.java b/src/de/craftinc/gates/commands/CommandHelp.java index 00d1c79..aac7f6d 100644 --- a/src/de/craftinc/gates/commands/CommandHelp.java +++ b/src/de/craftinc/gates/commands/CommandHelp.java @@ -33,17 +33,17 @@ public class CommandHelp extends BaseCommand List allUsageStrings = new ArrayList(); allUsageStrings.add( new CommandHelp().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandCreate().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandDelete().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandSetLocation().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandSetExit().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandNew().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandRemove().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandLocation().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandExit().getUsageTemplate(true, true) ); allUsageStrings.add( new CommandOpen().getUsageTemplate(true, true) ); allUsageStrings.add( new CommandRename().getUsageTemplate(true, true) ); allUsageStrings.add( new CommandClose().getUsageTemplate(true, true) ); allUsageStrings.add( new CommandList().getUsageTemplate(true, true) ); allUsageStrings.add( new CommandInfo().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandSetHidden().getUsageTemplate(true, true) ); - allUsageStrings.add( new CommandSetVisible().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandHide().getUsageTemplate(true, true) ); + allUsageStrings.add( new CommandUnhide().getUsageTemplate(true, true) ); Collections.sort(allUsageStrings); diff --git a/src/de/craftinc/gates/commands/CommandSetHidden.java b/src/de/craftinc/gates/commands/CommandHide.java similarity index 94% rename from src/de/craftinc/gates/commands/CommandSetHidden.java rename to src/de/craftinc/gates/commands/CommandHide.java index b8b3d89..d4c1818 100644 --- a/src/de/craftinc/gates/commands/CommandSetHidden.java +++ b/src/de/craftinc/gates/commands/CommandHide.java @@ -24,11 +24,12 @@ import org.bukkit.ChatColor; import de.craftinc.gates.Plugin; -public class CommandSetHidden extends BaseCommand +public class CommandHide extends BaseCommand { - public CommandSetHidden() + public CommandHide() { aliases.add("hide"); + aliases.add("h"); requiredParameters.add("id"); diff --git a/src/de/craftinc/gates/commands/CommandInfo.java b/src/de/craftinc/gates/commands/CommandInfo.java index b25a897..9eff232 100644 --- a/src/de/craftinc/gates/commands/CommandInfo.java +++ b/src/de/craftinc/gates/commands/CommandInfo.java @@ -28,10 +28,8 @@ public class CommandInfo extends BaseCommand public CommandInfo() { aliases.add("info"); - aliases.add("details"); aliases.add("i"); - aliases.add("d"); - + requiredParameters.add("id"); helpDescription = "Print detailed information about a certain gate."; diff --git a/src/de/craftinc/gates/commands/CommandSetLocation.java b/src/de/craftinc/gates/commands/CommandLocation.java similarity index 88% rename from src/de/craftinc/gates/commands/CommandSetLocation.java rename to src/de/craftinc/gates/commands/CommandLocation.java index 9c1d9e2..d5fa315 100644 --- a/src/de/craftinc/gates/commands/CommandSetLocation.java +++ b/src/de/craftinc/gates/commands/CommandLocation.java @@ -25,15 +25,16 @@ import org.bukkit.ChatColor; import org.bukkit.Location; import de.craftinc.gates.Plugin; +import org.bukkit.block.Block; -public class CommandSetLocation extends BaseLocationCommand +public class CommandLocation extends BaseLocationCommand { - public CommandSetLocation() + public CommandLocation() { aliases.add("location"); - aliases.add("l"); + aliases.add("lo"); requiredParameters.add("id"); @@ -61,9 +62,10 @@ public class CommandSetLocation extends BaseLocationCommand { Location oldLocation = gate.getLocation(); Set oldGateBlockLocations = gate.getGateBlockLocations(); + Set oldFrameBlocks = gate.getGateFrameBlocks(); gate.setLocation(playerLocation); - Plugin.getPlugin().getGatesManager().handleGateLocationChange(gate, oldLocation, oldGateBlockLocations); + Plugin.getPlugin().getGatesManager().handleGateLocationChange(gate, oldLocation, oldGateBlockLocations, oldFrameBlocks); sendMessage(ChatColor.GREEN + "The location of '" + gate.getId() + "' is now at your current location."); } diff --git a/src/de/craftinc/gates/commands/CommandCreate.java b/src/de/craftinc/gates/commands/CommandNew.java similarity index 92% rename from src/de/craftinc/gates/commands/CommandCreate.java rename to src/de/craftinc/gates/commands/CommandNew.java index 3d9d868..a61a960 100644 --- a/src/de/craftinc/gates/commands/CommandCreate.java +++ b/src/de/craftinc/gates/commands/CommandNew.java @@ -24,13 +24,13 @@ import de.craftinc.gates.GatesManager; import de.craftinc.gates.Plugin; -public class CommandCreate extends BaseLocationCommand +public class CommandNew extends BaseLocationCommand { - public CommandCreate() + public CommandNew() { - aliases.add("create"); aliases.add("new"); - + aliases.add("n"); + requiredParameters.add("id"); senderMustBePlayer = true; @@ -75,7 +75,7 @@ public class CommandCreate extends BaseLocationCommand else { sendMessage("Now you should build a frame and execute:"); - sendMessage(new CommandSetLocation().getUsageTemplate(true, true)); + sendMessage(new CommandLocation().getUsageTemplate(true, true)); } } } diff --git a/src/de/craftinc/gates/commands/CommandDelete.java b/src/de/craftinc/gates/commands/CommandRemove.java similarity index 94% rename from src/de/craftinc/gates/commands/CommandDelete.java rename to src/de/craftinc/gates/commands/CommandRemove.java index 02ef9db..fc497d8 100644 --- a/src/de/craftinc/gates/commands/CommandDelete.java +++ b/src/de/craftinc/gates/commands/CommandRemove.java @@ -22,14 +22,13 @@ import org.bukkit.ChatColor; import de.craftinc.gates.Plugin; -public class CommandDelete extends BaseCommand +public class CommandRemove extends BaseCommand { - public CommandDelete() + public CommandRemove() { aliases.add("delete"); aliases.add("del"); aliases.add("remove"); - aliases.add("rm"); requiredParameters.add("id"); diff --git a/src/de/craftinc/gates/commands/CommandRename.java b/src/de/craftinc/gates/commands/CommandRename.java index f325a42..b4b7cc8 100644 --- a/src/de/craftinc/gates/commands/CommandRename.java +++ b/src/de/craftinc/gates/commands/CommandRename.java @@ -27,9 +27,8 @@ public class CommandRename extends BaseCommand public CommandRename() { aliases.add("rename"); - aliases.add("changename"); - aliases.add("cn"); - + aliases.add("rn"); + hasGateParam = true; senderMustBePlayer = false; diff --git a/src/de/craftinc/gates/commands/CommandSetVisible.java b/src/de/craftinc/gates/commands/CommandUnhide.java similarity index 93% rename from src/de/craftinc/gates/commands/CommandSetVisible.java rename to src/de/craftinc/gates/commands/CommandUnhide.java index fa240c3..8661df3 100644 --- a/src/de/craftinc/gates/commands/CommandSetVisible.java +++ b/src/de/craftinc/gates/commands/CommandUnhide.java @@ -21,13 +21,13 @@ import org.bukkit.ChatColor; import de.craftinc.gates.Plugin; -public class CommandSetVisible extends BaseCommand +public class CommandUnhide extends BaseCommand { - public CommandSetVisible() + public CommandUnhide() { aliases.add("unhide"); - aliases.add("uh"); + aliases.add("u"); requiredParameters.add("id");