1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-07-31 20:00:47 +02:00

Future Java versions may not support _ as identifier.

This commit is contained in:
FearFree
2014-03-20 10:54:07 -05:00
committed by Chris Ward
parent 7266908177
commit 51bd0d88f3
176 changed files with 1032 additions and 1028 deletions

View File

@@ -1,6 +1,6 @@
package com.earth2me.essentials.antibuild;
import static com.earth2me.essentials.I18n._;
import static com.earth2me.essentials.I18n.tl;
import com.earth2me.essentials.User;
import net.ess3.api.IEssentials;
import java.util.logging.Level;
@@ -85,7 +85,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildPlace", type.toString()));
user.sendMessage(tl("antiBuildPlace", type.toString()));
}
event.setCancelled(true);
return;
@@ -95,7 +95,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildPlace", type.toString()));
user.sendMessage(tl("antiBuildPlace", type.toString()));
}
event.setCancelled(true);
return;
@@ -104,7 +104,7 @@ public class EssentialsAntiBuildListener implements Listener
if (prot.checkProtectionItems(AntiBuildConfig.alert_on_placement, typeId)
&& !user.isAuthorized("essentials.protect.alerts.notrigger"))
{
prot.getEssentialsConnect().alert(user, type.toString(), _("alertPlaced"));
prot.getEssentialsConnect().alert(user, type.toString(), tl("alertPlaced"));
}
}
@@ -121,7 +121,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildBreak", type.toString()));
user.sendMessage(tl("antiBuildBreak", type.toString()));
}
event.setCancelled(true);
return;
@@ -132,7 +132,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildBreak", type.toString()));
user.sendMessage(tl("antiBuildBreak", type.toString()));
}
event.setCancelled(true);
return;
@@ -141,7 +141,7 @@ public class EssentialsAntiBuildListener implements Listener
if (prot.checkProtectionItems(AntiBuildConfig.alert_on_break, typeId)
&& !user.isAuthorized("essentials.protect.alerts.notrigger"))
{
prot.getEssentialsConnect().alert(user, type.toString(), _("alertBroke"));
prot.getEssentialsConnect().alert(user, type.toString(), tl("alertBroke"));
}
}
@@ -160,7 +160,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (warn)
{
user.sendMessage(_("antiBuildBreak", Material.PAINTING.toString()));
user.sendMessage(tl("antiBuildBreak", Material.PAINTING.toString()));
}
event.setCancelled(true);
}
@@ -168,7 +168,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (warn)
{
user.sendMessage(_("antiBuildBreak", Material.ITEM_FRAME.toString()));
user.sendMessage(tl("antiBuildBreak", Material.ITEM_FRAME.toString()));
}
event.setCancelled(true);
}
@@ -216,7 +216,7 @@ public class EssentialsAntiBuildListener implements Listener
{
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildUse", item.getType().toString()));
user.sendMessage(tl("antiBuildUse", item.getType().toString()));
}
event.setCancelled(true);
return;
@@ -226,7 +226,7 @@ public class EssentialsAntiBuildListener implements Listener
&& prot.checkProtectionItems(AntiBuildConfig.alert_on_use, item.getTypeId())
&& !user.isAuthorized("essentials.protect.alerts.notrigger"))
{
prot.getEssentialsConnect().alert(user, item.getType().toString(), _("alertUsed"));
prot.getEssentialsConnect().alert(user, item.getType().toString(), tl("alertUsed"));
}
if (prot.getSettingBool(AntiBuildConfig.disable_use) && !user.canBuild() && !user.isAuthorized("essentials.build"))
@@ -236,7 +236,7 @@ public class EssentialsAntiBuildListener implements Listener
event.setCancelled(true);
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildUse", item.getType().toString()));
user.sendMessage(tl("antiBuildUse", item.getType().toString()));
}
return;
}
@@ -245,7 +245,7 @@ public class EssentialsAntiBuildListener implements Listener
event.setCancelled(true);
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildInteract", event.getClickedBlock().getType().toString()));
user.sendMessage(tl("antiBuildInteract", event.getClickedBlock().getType().toString()));
}
}
}
@@ -268,7 +268,7 @@ public class EssentialsAntiBuildListener implements Listener
event.setCancelled(true);
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildCraft", item.getType().toString()));
user.sendMessage(tl("antiBuildCraft", item.getType().toString()));
}
}
}
@@ -307,7 +307,7 @@ public class EssentialsAntiBuildListener implements Listener
user.updateInventory();
if (ess.getSettings().warnOnBuildDisallow())
{
user.sendMessage(_("antiBuildDrop", item.getType().toString()));
user.sendMessage(tl("antiBuildDrop", item.getType().toString()));
}
}
}

View File

@@ -2,7 +2,7 @@ package com.earth2me.essentials.antibuild;
import com.earth2me.essentials.IConf;
import com.earth2me.essentials.User;
import static com.earth2me.essentials.I18n._;
import static com.earth2me.essentials.I18n.tl;
import net.ess3.api.IEssentials;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -21,7 +21,7 @@ public class EssentialsConnect
{
if (!essProtect.getDescription().getVersion().equals(essPlugin.getDescription().getVersion()))
{
LOGGER.log(Level.WARNING, _("versionMismatchAll"));
LOGGER.log(Level.WARNING, tl("versionMismatchAll"));
}
ess = (IEssentials)essPlugin;
protect = (IAntiBuild)essProtect;
@@ -42,7 +42,7 @@ public class EssentialsConnect
public void alert(final User user, final String item, final String type)
{
final Location loc = user.getLocation();
final String warnMessage = _("alertFormat", user.getName(), type, item,
final String warnMessage = tl("alertFormat", user.getName(), type, item,
loc.getWorld().getName() + "," + loc.getBlockX() + ","
+ loc.getBlockY() + "," + loc.getBlockZ());
LOGGER.log(Level.WARNING, warnMessage);