Merge branch 'refs/heads/2.9' into release

This commit is contained in:
snowleo 2012-08-07 17:45:40 +02:00
commit 4d8116cc39
4 changed files with 44 additions and 10 deletions

View File

@ -158,9 +158,11 @@ player-commands:
- signs.use.free - signs.use.free
- signs.use.gamemode - signs.use.gamemode
- signs.use.heal - signs.use.heal
- signs.use.info
- signs.use.kit - signs.use.kit
- signs.use.mail - signs.use.mail
- signs.use.protection - signs.use.protection
- signs.use.repair
- signs.use.sell - signs.use.sell
- signs.use.time - signs.use.time
- signs.use.trade - signs.use.trade

View File

@ -1733,6 +1733,8 @@ endgooframe,120,0
endergooframe,120,0 endergooframe,120,0
egooframe,120,0 egooframe,120,0
eportalframe,120,0 eportalframe,120,0
enderframe,120,0
endframe,120,0
enderstone,121,0 enderstone,121,0
endstone,121,0 endstone,121,0
endrock,121,0 endrock,121,0

1 #version: teamcity
1733 endergooframe,120,0
1734 egooframe,120,0
1735 eportalframe,120,0
1736 enderframe,120,0
1737 endframe,120,0
1738 enderstone,121,0
1739 endstone,121,0
1740 endrock,121,0

View File

@ -6,6 +6,7 @@ import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Trade; import com.earth2me.essentials.Trade;
import com.earth2me.essentials.User; import com.earth2me.essentials.User;
import java.util.Map; import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Server; import org.bukkit.Server;
@ -46,13 +47,27 @@ public abstract class EssentialsChatPlayer implements Listener
} }
synchronized (listeners) synchronized (listeners)
{ {
for (IEssentialsChatListener listener : listeners.values()) for (Map.Entry<String, IEssentialsChatListener> listener : listeners.entrySet())
{ {
if (listener.shouldHandleThisChat(event)) try
{
if (listener.getValue().shouldHandleThisChat(event))
{ {
return true; return true;
} }
} }
catch (Throwable t)
{
if (ess.getSettings().isDebug())
{
logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage(), t);
}
else
{
logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage());
}
}
}
} }
return false; return false;
} }
@ -160,9 +175,23 @@ public abstract class EssentialsChatPlayer implements Listener
String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage()); String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
synchronized (listeners) synchronized (listeners)
{ {
for (IEssentialsChatListener listener : listeners.values()) for (Map.Entry<String, IEssentialsChatListener> listener : listeners.entrySet())
{ {
message = listener.modifyMessage(event, onlinePlayer, message); try
{
message = listener.getValue().modifyMessage(event, onlinePlayer, message);
}
catch (Throwable t)
{
if (ess.getSettings().isDebug())
{
logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage(), t);
}
else
{
logger.log(Level.WARNING, "Error with EssentialsChat listener of " + listener.getKey() + ": " + t.getMessage());
}
}
} }
} }
onlineUser.sendMessage(message); onlineUser.sendMessage(message);

View File

@ -222,6 +222,7 @@ groups:
- essentials.warp.* - essentials.warp.*
- essentials.weather - essentials.weather
- essentials.whois - essentials.whois
- essentials.workbench
- essentials.world - essentials.world
- essentials.world.* - essentials.world.*