summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsProtect/src/com')
-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"));
}
}
}