diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-10 19:57:59 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-05-10 19:57:59 +0000 |
commit | bc79d5acfcaf6a112bbc22c9c387999f82d89201 (patch) | |
tree | 36cb2703850d497c459123f9a8fe04d22b0be4d7 /EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java | |
parent | 0671150c4255565eb1168780d84a2ef68a3df023 (diff) | |
download | Essentials-bc79d5acfcaf6a112bbc22c9c387999f82d89201.tar Essentials-bc79d5acfcaf6a112bbc22c9c387999f82d89201.tar.gz Essentials-bc79d5acfcaf6a112bbc22c9c387999f82d89201.tar.lz Essentials-bc79d5acfcaf6a112bbc22c9c387999f82d89201.tar.xz Essentials-bc79d5acfcaf6a112bbc22c9c387999f82d89201.zip |
More translation stuff. Translated Spawn, Chat, Protect, GeoIP
Protect is only partly translated (sql stuff is not translated)
EssentialsSpawn is changed to use the onCommand from Essentials jar, since that is more up to date.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1408 e251c2fe-e539-e718-e476-b85c1f46cddb
Diffstat (limited to 'EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java deleted file mode 100644 index db3911c7a..000000000 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnWorker.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.earth2me.essentials.spawn; - -import java.util.logging.*; -import com.earth2me.essentials.*; -import com.earth2me.essentials.commands.IEssentialsCommand; -import org.bukkit.command.*; - - -public class EssentialsSpawnWorker -{ - private static final Logger logger = Logger.getLogger("Minecraft"); - - @SuppressWarnings( - { - "LoggerStringConcat", "CallToThreadDumpStack" - }) - public static boolean onCommand(CommandSender sender, Command command, String commandLabel, String[] args) - { - User user = Essentials.getStatic().getUser(sender); - - IEssentialsCommand cmd; - try - { - cmd = (IEssentialsCommand)EssentialsSpawn.class.getClassLoader().loadClass("com.earth2me.essentials.spawn.Command" + command.getName()).newInstance(); - } - catch (Exception ex) - { - sender.sendMessage("§cThat command is improperly loaded."); - ex.printStackTrace(); - return true; - } - - // Check authorization - if (user != null && !user.isAuthorized(cmd)) - { - logger.warning(user.getName() + " was denied access to command."); - user.sendMessage("§cYou do not have access to that command."); - return true; - } - - // Run the command - try - { - if (user == null) - cmd.run(Essentials.getStatic().getServer(), sender, commandLabel, command, args); - else - cmd.run(Essentials.getStatic().getServer(), user, commandLabel, command, args); - return true; - } - catch (Exception ex) - { - sender.sendMessage((user == null ? "" : "§c") + "Error: " + ex.getMessage()); - return true; - } - } -} |