mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-06 04:58:00 +02:00
Merge branch 'refs/heads/2.9' into release
This commit is contained in:
commit
4d8116cc39
@ -158,9 +158,11 @@ player-commands:
|
||||
- signs.use.free
|
||||
- signs.use.gamemode
|
||||
- signs.use.heal
|
||||
- signs.use.info
|
||||
- signs.use.kit
|
||||
- signs.use.mail
|
||||
- signs.use.protection
|
||||
- signs.use.repair
|
||||
- signs.use.sell
|
||||
- signs.use.time
|
||||
- signs.use.trade
|
||||
|
@ -1733,6 +1733,8 @@ endgooframe,120,0
|
||||
endergooframe,120,0
|
||||
egooframe,120,0
|
||||
eportalframe,120,0
|
||||
enderframe,120,0
|
||||
endframe,120,0
|
||||
enderstone,121,0
|
||||
endstone,121,0
|
||||
endrock,121,0
|
||||
|
|
@ -6,6 +6,7 @@ import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.Trade;
|
||||
import com.earth2me.essentials.User;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@ -46,11 +47,25 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||
}
|
||||
synchronized (listeners)
|
||||
{
|
||||
for (IEssentialsChatListener listener : listeners.values())
|
||||
for (Map.Entry<String, IEssentialsChatListener> listener : listeners.entrySet())
|
||||
{
|
||||
if (listener.shouldHandleThisChat(event))
|
||||
try
|
||||
{
|
||||
return true;
|
||||
if (listener.getValue().shouldHandleThisChat(event))
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -160,9 +175,23 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||
String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
|
||||
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);
|
||||
|
@ -222,6 +222,7 @@ groups:
|
||||
- essentials.warp.*
|
||||
- essentials.weather
|
||||
- essentials.whois
|
||||
- essentials.workbench
|
||||
- essentials.world
|
||||
- essentials.world.*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user