summaryrefslogtreecommitdiffstats
path: root/EssentialsChat/src
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 19:57:59 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 19:57:59 +0000
commite846093fd0e8ea20c7ab9cec2deda2ae40573295 (patch)
treef7eee8b35466f3b12fcaea5359a93b05bd577d0d /EssentialsChat/src
parent8e1f01810469131a18f2ac6898ad793c09b8a460 (diff)
downloadEssentials-e846093fd0e8ea20c7ab9cec2deda2ae40573295.tar
Essentials-e846093fd0e8ea20c7ab9cec2deda2ae40573295.tar.gz
Essentials-e846093fd0e8ea20c7ab9cec2deda2ae40573295.tar.lz
Essentials-e846093fd0e8ea20c7ab9cec2deda2ae40573295.tar.xz
Essentials-e846093fd0e8ea20c7ab9cec2deda2ae40573295.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 'EssentialsChat/src')
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java5
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java15
2 files changed, 11 insertions, 9 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
index 266bd104e..2e89e9ee3 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.chat;
import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.Util;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.event.Event.Priority;
@@ -32,9 +33,9 @@ public class EssentialsChat extends JavaPlugin
pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
pm.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
- logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version.");
+ logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
- logger.info("Loaded " + this.getDescription().getName() + " build " + this.getDescription().getVersion() + " by " + Essentials.AUTHORS);
+ logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}
public void onDisable()
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java
index 1ba7f8274..7cde272ae 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatWorker.java
@@ -2,6 +2,7 @@ package com.earth2me.essentials.chat;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import com.nijikokun.bukkit.Permissions.Permissions;
import java.util.logging.Logger;
import org.bukkit.Location;
@@ -43,12 +44,12 @@ public class EssentialsChatWorker
}
catch (Throwable ex)
{
- logger.warning("Missing a prefix or suffix for " + group);
+ logger.warning(Util.format("missingPrefixSuffix", group));
}
}
catch (Throwable ex)
{
- logger.warning("Missing Permissions/GroupManager; chat prefixes/suffixes will be disabled.");
+ logger.warning(Util.i18n("permissionsError"));
}
}
@@ -71,10 +72,10 @@ public class EssentialsChatWorker
if (user.isAuthorized("essentials.chat.shout"))
{
event.setMessage(event.getMessage().substring(1));
- event.setFormat("§7[Shout]§f " + event.getFormat());
+ event.setFormat(Util.format("shoutFormat", event.getFormat()));
return;
}
- user.sendMessage("§cYou are not authorized to shout.");
+ user.sendMessage(Util.i18n("notAllowedToShout"));
event.setCancelled(true);
return;
}
@@ -84,16 +85,16 @@ public class EssentialsChatWorker
if (user.isAuthorized("essentials.chat.question"))
{
event.setMessage(event.getMessage().substring(1));
- event.setFormat("§7[Question]§f " + event.getFormat());
+ event.setFormat(Util.format("questionFormat", event.getFormat()));
return;
}
- user.sendMessage("§cYou are not authorized to use question.");
+ user.sendMessage(Util.i18n("notAllowedToQuestion"));
event.setCancelled(true);
return;
}
event.setCancelled(true);
- logger.info("Local: <" + user.getName() + "> " + event.getMessage());
+ logger.info(Util.format("localFormat", user.getName(), event.getMessage()));
Location loc = user.getLocation();
World w = loc.getWorld();