Config to disable World chat.

This commit is contained in:
MobiusDev
2017-05-01 11:32:20 +00:00
parent ab939796cd
commit 6892014a09
18 changed files with 72 additions and 6 deletions

View File

@@ -367,7 +367,10 @@ public class AdminAdmin implements IAdminCommandHandler
activeChar.sendMessage(targetPlayer.getName() + ": points changed from " + targetPlayer.getWorldChatPoints() + " to " + valueToken);
targetPlayer.setWorldChatPoints(Integer.parseInt(valueToken));
targetPlayer.sendPacket(new ExWorldChatCnt(targetPlayer));
if (Config.ENABLE_WORLD_CHAT)
{
targetPlayer.sendPacket(new ExWorldChatCnt(targetPlayer));
}
break;
}
default:

View File

@@ -47,6 +47,11 @@ public final class ChatWorld implements IChatHandler
@Override
public void handleChat(ChatType type, L2PcInstance activeChar, String target, String text)
{
if (!Config.ENABLE_WORLD_CHAT)
{
return;
}
final Instant now = Instant.now();
if (!REUSE.isEmpty())
{