Cleaned Commands.java
This commit is contained in:
parent
2c63216f0c
commit
fef6b61c0b
1 changed files with 8 additions and 22 deletions
|
@ -32,18 +32,6 @@ public class Commands implements CommandExecutor
|
||||||
PluginMain.getPlugin(PluginMain.class).Stop(sender);
|
PluginMain.getPlugin(PluginMain.class).Stop(sender);
|
||||||
break;
|
break;
|
||||||
case "debug":
|
case "debug":
|
||||||
/*
|
|
||||||
* sender.sendMessage("Screen length1: "
|
|
||||||
* + PluginMain.Instance.Screen.length);
|
|
||||||
* sender.sendMessage("Screen length2: "
|
|
||||||
* + PluginMain.Instance.Screen[0].length);
|
|
||||||
* sender.sendMessage("Screen length3: "
|
|
||||||
* + PluginMain.Instance.Screen[0][0].length);
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
* sender.sendMessage("UpdatePixels: "
|
|
||||||
* + ImageRenderer.updatepixels);
|
|
||||||
*/
|
|
||||||
World w = Bukkit.getWorlds().get(0);
|
World w = Bukkit.getWorlds().get(0);
|
||||||
Craft[] crafts = CraftManager.getInstance().getCraftsInWorld(w);
|
Craft[] crafts = CraftManager.getInstance().getCraftsInWorld(w);
|
||||||
sender.sendMessage("World: " + w);
|
sender.sendMessage("World: " + w);
|
||||||
|
@ -73,7 +61,7 @@ public class Commands implements CommandExecutor
|
||||||
case "key":
|
case "key":
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
sender.sendMessage("§cUsage: /computer key <key> [down/up|interval]");
|
sender.sendMessage("§cUsage: /computer key <key> [down/up|interval]");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.length < 3)
|
if (args.length < 3)
|
||||||
|
@ -102,14 +90,12 @@ public class Commands implements CommandExecutor
|
||||||
{
|
{
|
||||||
PluginMain.getPlugin(PluginMain.class).UpdateMouse(
|
PluginMain.getPlugin(PluginMain.class).UpdateMouse(
|
||||||
sender, 0, 0, 0, 0,
|
sender, 0, 0, 0, 0,
|
||||||
//MouseButtonState.valueOf(args[1]),
|
|
||||||
args[1], (args[2].equals("down")));
|
args[1], (args[2].equals("down")));
|
||||||
showusage = false;
|
showusage = false;
|
||||||
} else if (args.length == 2)
|
} else if (args.length == 2)
|
||||||
{
|
{
|
||||||
PluginMain.getPlugin(PluginMain.class).UpdateMouse(
|
PluginMain.getPlugin(PluginMain.class).UpdateMouse(
|
||||||
sender, 0, 0, 0, 0,
|
sender, 0, 0, 0, 0,
|
||||||
//MouseButtonState.valueOf(args[1]));
|
|
||||||
args[1]);
|
args[1]);
|
||||||
showusage = false;
|
showusage = false;
|
||||||
}
|
}
|
||||||
|
@ -117,14 +103,14 @@ public class Commands implements CommandExecutor
|
||||||
}
|
}
|
||||||
if (showusage)
|
if (showusage)
|
||||||
{
|
{
|
||||||
sender.sendMessage("§cUsage: /computer mouse <relx> <rely> <relz> <relw>");
|
sender.sendMessage("§cUsage: /computer mouse <relx> <rely> <relz> <relw>");
|
||||||
sender.sendMessage("§cOr: /computer mouse <button> [up/down]");
|
sender.sendMessage("§cOr: /computer mouse <button> [up/down]");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "mspeed":
|
case "mspeed":
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
sender.sendMessage("§cUsage: /computer mspeed <speed>");
|
sender.sendMessage("§cUsage: /computer mspeed <speed>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
PluginMain.MouseSpeed = Integer.parseInt(args[1]);
|
PluginMain.MouseSpeed = Integer.parseInt(args[1]);
|
||||||
|
@ -134,12 +120,12 @@ public class Commands implements CommandExecutor
|
||||||
{
|
{
|
||||||
if (!(sender instanceof Player))
|
if (!(sender instanceof Player))
|
||||||
{
|
{
|
||||||
sender.sendMessage("§cError: Only players can use this command.");
|
sender.sendMessage("§cError: Only players can use this command.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.length < 2)
|
if (args.length < 2)
|
||||||
{
|
{
|
||||||
sender.sendMessage("§cUsage: /computer input <key|mouse>");
|
sender.sendMessage("§cUsage: /computer input <key|mouse>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args[1].equalsIgnoreCase("key"))
|
if (args[1].equalsIgnoreCase("key"))
|
||||||
|
@ -178,9 +164,9 @@ public class Commands implements CommandExecutor
|
||||||
{
|
{
|
||||||
MouseLockerPlayerListener.MouseLocked = !MouseLockerPlayerListener.MouseLocked;
|
MouseLockerPlayerListener.MouseLocked = !MouseLockerPlayerListener.MouseLocked;
|
||||||
if (MouseLockerPlayerListener.MouseLocked)
|
if (MouseLockerPlayerListener.MouseLocked)
|
||||||
sender.sendMessage("§aMouse locked.");
|
sender.sendMessage("§aMouse locked.");
|
||||||
else
|
else
|
||||||
sender.sendMessage("§bMouse unlocked.");
|
sender.sendMessage("§bMouse unlocked.");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue