mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Little bit of powertools code cleanup.
This commit is contained in:
parent
195604997b
commit
932de33349
1 changed files with 9 additions and 17 deletions
|
@ -51,11 +51,9 @@ public class Commandpowertool extends EssentialsCommand
|
|||
{
|
||||
user.sendMessage(_("powerToolList", Util.joinList(powertools), itemName));
|
||||
}
|
||||
return;
|
||||
throw new NoChargeException();
|
||||
}
|
||||
if (command.startsWith("r:"))
|
||||
{
|
||||
try
|
||||
{
|
||||
command = command.substring(2);
|
||||
if (!powertools.contains(command))
|
||||
|
@ -66,12 +64,6 @@ public class Commandpowertool extends EssentialsCommand
|
|||
powertools.remove(command);
|
||||
user.sendMessage(_("powerToolRemove", command, itemName));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
user.sendMessage(e.getMessage());
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (command.startsWith("a:"))
|
||||
|
@ -85,7 +77,6 @@ public class Commandpowertool extends EssentialsCommand
|
|||
{
|
||||
throw new Exception(_("powerToolAlreadySet", command, itemName));
|
||||
}
|
||||
|
||||
}
|
||||
else if (powertools != null && !powertools.isEmpty())
|
||||
{
|
||||
|
@ -110,7 +101,8 @@ public class Commandpowertool extends EssentialsCommand
|
|||
user.sendMessage(_("powerToolRemoveAll", itemName));
|
||||
}
|
||||
|
||||
if (!user.arePowerToolsEnabled()) {
|
||||
if (!user.arePowerToolsEnabled())
|
||||
{
|
||||
user.setPowerToolsEnabled(true);
|
||||
user.sendMessage(_("powerToolsEnabled"));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue