mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-02 17:09:58 +01: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.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
|
||||||
|
@ -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
|
||||||
|
|
@ -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);
|
||||||
|
@ -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.*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user