summaryrefslogtreecommitdiffstats
path: root/EssentialsChat/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsChat/src/com')
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java10
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java12
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java3
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java10
4 files changed, 13 insertions, 22 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
index c0559ddef..f547f0da0 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java
@@ -1,7 +1,7 @@
package com.earth2me.essentials.chat;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
-import com.earth2me.essentials.Util;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
@@ -32,21 +32,21 @@ public class EssentialsChat extends JavaPlugin
pluginManager.registerEvent(Type.PLAYER_CHAT, playerListenerHighest, Priority.Highest, this);
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
+ LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
- LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
+ LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
}
public void onDisable()
{
chatListener.clear();
}
-
+
public void addEssentialsChatListener(final String plugin, final IEssentialsChatListener listener)
{
chatListener.put(plugin, listener);
}
-
+
public IEssentialsChatListener removeEssentialsChatListener(final String plugin)
{
return chatListener.remove(plugin);
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
index aeaa38d89..305e13e8a 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java
@@ -1,14 +1,10 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package com.earth2me.essentials.chat;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.Map;
import java.util.logging.Logger;
import org.bukkit.Location;
@@ -20,10 +16,6 @@ import org.bukkit.event.player.PlayerChatEvent;
import org.bukkit.event.player.PlayerListener;
-/**
- *
- * @author Seiji
- */
public abstract class EssentialsChatPlayer extends PlayerListener
{
protected transient IEssentials ess;
@@ -117,7 +109,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener
protected void sendLocalChat(final User sender, final long radius, final PlayerChatEvent event)
{
event.setCancelled(true);
- logger.info(Util.format("localFormat", sender.getName(), event.getMessage()));
+ logger.info(_("localFormat", sender.getName(), event.getMessage()));
final Location loc = sender.getLocation();
final World world = loc.getWorld();
final int x = loc.getBlockX();
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
index ba4e63d98..0945fcd93 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
@@ -23,8 +23,7 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
}
/**
- * This listener should apply the general chat formatting only...then return control back
- * the event handler
+ * This listener should apply the general chat formatting only...then return control back the event handler
*/
final User user = ess.getUser(event.getPlayer());
if (user.isAuthorized("essentials.chat.color"))
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
index d726cb569..363e4ca6e 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java
@@ -1,9 +1,9 @@
package com.earth2me.essentials.chat;
import com.earth2me.essentials.ChargeException;
+import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.User;
-import com.earth2me.essentials.Util;
import java.util.Map;
import org.bukkit.Server;
import org.bukkit.event.player.PlayerChatEvent;
@@ -25,8 +25,8 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
}
/**
- * This file should handle detection of the local chat features...
- * if local chat is enabled, we need to handle it here
+ * This file should handle detection of the local chat features... if local chat is enabled, we need to handle
+ * it here
*/
final User user = ess.getUser(event.getPlayer());
final String chatType = getChatType(event.getMessage());
@@ -56,11 +56,11 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
{
charge(user, command.toString());
event.setMessage(event.getMessage().substring(1));
- event.setFormat(Util.format(format.toString(), event.getFormat()));
+ event.setFormat(_(format.toString(), event.getFormat()));
return;
}
- user.sendMessage(Util.i18n(errorMsg.toString()));
+ user.sendMessage(_(errorMsg.toString()));
event.setCancelled(true);
return;
}