1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 19:44:15 +02:00

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
This commit is contained in:
snowleo
2011-05-10 19:57:59 +00:00
parent 8e1f018104
commit e846093fd0
13 changed files with 76 additions and 109 deletions

View File

@@ -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())));
}
}
}

View File

@@ -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"))

View File

@@ -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"));
}
}
}