summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
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 /EssentialsProtect
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 'EssentialsProtect')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java10
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java7
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java8
3 files changed, 13 insertions, 12 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index b4ee458f9..337b2c107 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -2,6 +2,7 @@ package com.earth2me.essentials.protect;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.logging.Level;
@@ -76,11 +77,10 @@ public class EssentialsProtect extends JavaPlugin
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Highest, this);
loadSettings();
- if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
- {
- logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version.");
+ if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
+ logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
- logger.info("Loaded " + this.getDescription().getName() + " build " + this.getDescription().getVersion() + " maintained by " + AUTHORS);
+ logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
}
public static boolean checkProtectionItems(ArrayList<Integer> itemList, int id)
@@ -130,7 +130,7 @@ public class EssentialsProtect extends JavaPlugin
{
User alertUser = Essentials.getStatic().getUser(p);
if (alertUser.isAuthorized("essentials.protect.alerts"))
- alertUser.sendMessage(ChatColor.DARK_AQUA + "[" + user.getName() + "] " + ChatColor.WHITE + type + ChatColor.GOLD + item + " at: " + EssentialsProtectData.formatCoords(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
+ alertUser.sendMessage(Util.format("alertFormat", user.getName(), type, item, EssentialsProtectData.formatCoords(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())));
}
}
}
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
index d15ab6067..f256e185f 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
@@ -2,6 +2,7 @@ package com.earth2me.essentials.protect;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -46,7 +47,7 @@ public class EssentialsProtectBlockListener extends BlockListener
{
if(Essentials.getStatic().getSettings().warnOnBuildDisallow())
{
- user.sendMessage(ChatColor.RED + "You are not permitted to build");
+ user.sendMessage(Util.i18n("buildAlert"));
}
event.setCancelled(true);
return;
@@ -63,7 +64,7 @@ public class EssentialsProtectBlockListener extends BlockListener
if (EssentialsProtect.checkProtectionItems(EssentialsProtect.onPlaceAlert, id))
{
- parent.alert(user, item.getType().toString(), "placed: ");
+ parent.alert(user, item.getType().toString(), Util.i18n("alertPlaced"));
}
if (spData.isBlockAboveProtectedRail(blockPlaced.getFace(BlockFace.DOWN)))
@@ -243,7 +244,7 @@ public class EssentialsProtectBlockListener extends BlockListener
if (EssentialsProtect.checkProtectionItems(EssentialsProtect.onBreakAlert, block.getTypeId()))
{
- parent.alert(user, block.getType().toString(), "broke: ");
+ parent.alert(user, block.getType().toString(), Util.i18n("alertBroke"));
}
if (user.isAuthorized("essentials.protect.admin"))
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index b0381640e..758d0010a 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -2,6 +2,7 @@ package com.earth2me.essentials.protect;
import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.User;
+import com.earth2me.essentials.Util;
import org.bukkit.ChatColor;
import org.bukkit.block.Block;
import org.bukkit.event.block.Action;
@@ -39,7 +40,7 @@ public class EssentialsProtectPlayerListener extends PlayerListener
{
if(Essentials.getStatic().getSettings().warnOnBuildDisallow())
{
- user.sendMessage(ChatColor.RED + "You are not permitted to build");
+ user.sendMessage(Util.i18n("buildAlert"));
}
event.setCancelled(true);
return;
@@ -58,13 +59,12 @@ public class EssentialsProtectPlayerListener extends PlayerListener
blockClicked);
if (ownerName != null)
{
- user.sendMessage(ChatColor.GOLD + "[EssentialsProtect] Protection owner: "
- + ownerName);
+ user.sendMessage(Util.format("protectionOwner", ownerName));
}
}
if (item != null && EssentialsProtect.checkProtectionItems(EssentialsProtect.onUseAlert, item.getTypeId()))
{
- parent.alert(user, item.getType().toString(), "used: ");
+ parent.alert(user, item.getType().toString(), Util.i18n("alertUsed"));
}
}
}