summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
index 58da18c21..63717fcae 100644
--- a/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
+++ b/Essentials/src/com/earth2me/essentials/commands/EssentialsCommand.java
@@ -1,17 +1,16 @@
package com.earth2me.essentials.commands;
-import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
+import com.earth2me.essentials.IEssentials;
+import com.earth2me.essentials.OfflinePlayer;
import com.earth2me.essentials.Trade;
+import com.earth2me.essentials.User;
import java.util.List;
+import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
-import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.OfflinePlayer;
import org.bukkit.entity.Player;
-import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
-import java.util.logging.Logger;
public abstract class EssentialsCommand implements IEssentialsCommand
@@ -25,11 +24,13 @@ public abstract class EssentialsCommand implements IEssentialsCommand
this.name = name;
}
+ @Override
public void setEssentials(final IEssentials ess)
{
this.ess = ess;
}
+ @Override
public String getName()
{
return name;
@@ -51,7 +52,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
{
if (!getOffline && (user.getBase() instanceof OfflinePlayer || user.isHidden()))
{
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
return user;
}
@@ -73,7 +74,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
return userMatch;
}
}
- throw new NoSuchFieldException(Util.i18n("playerNotFound"));
+ throw new NoSuchFieldException(_("playerNotFound"));
}
@Override
@@ -98,7 +99,7 @@ public abstract class EssentialsCommand implements IEssentialsCommand
protected void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
- throw new Exception(Util.format("onlyPlayers", commandLabel));
+ throw new Exception(_("onlyPlayers", commandLabel));
}
public static String getFinalArg(final String[] args, final int start)