Merge branch 'clans/alpha' of ssh://184.154.0.242:7999/min/Mineplex into clans/beta
Conflicts: Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/gameplay/Gameplay.java
This commit is contained in:
commit
a0cc0b7ec9
@ -232,9 +232,13 @@ public class Chat extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void filterChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
// Dirty hack
|
||||
if (getPlugin().getName().contains("Clans"))
|
||||
return;
|
||||
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
@ -296,7 +300,7 @@ public class Chat extends MiniPlugin
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOW)
|
||||
@EventHandler(priority = EventPriority.NORMAL)
|
||||
public void HandleChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
if (event.isCancelled())
|
||||
|
@ -39,6 +39,7 @@ import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementManager;
|
||||
import mineplex.core.blockrestore.BlockRestore;
|
||||
import mineplex.core.chat.Chat;
|
||||
import mineplex.core.chat.MessageData;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
@ -676,7 +677,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
|
||||
{
|
||||
if (clan == null)
|
||||
{
|
||||
UtilServer.broadcast(String.format(rank + C.cYellow + "%s " + C.cWhite + "%s", event.getPlayer().getName(), event.getMessage()));
|
||||
UtilServer.broadcast(String.format(rank + C.cYellow + "%s " + C.cWhite + "%s", event.getPlayer().getName(), _chat.getFilteredMessage(event.getPlayer(), event.getMessage())));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -718,23 +719,45 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void handlePlayerChat(AsyncPlayerChatEvent event)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
event.setCancelled(false);
|
||||
|
||||
PunishClient punishclient = _punish.GetClient(event.getPlayer().getName());
|
||||
|
||||
if (punishclient != null && punishclient.IsMuted())
|
||||
_chat.HandleChat(event);
|
||||
|
||||
if (event.isCancelled())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (_chat.SilenceCheck(event.getPlayer()))
|
||||
else
|
||||
{
|
||||
return;
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
|
||||
// PunishClient punishclient = _punish.GetClient(event.getPlayer().getName());
|
||||
//
|
||||
// if (punishclient != null && punishclient.IsMuted())
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (_chat.SilenceCheck(event.getPlayer()))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// MessageData lastMessage = _chat.lastMessage(event.getPlayer());
|
||||
// long chatSlowTime = 1000L * _chat.getChatSlow();
|
||||
// long timeDiff = System.currentTimeMillis() - lastMessage.getTimeSent();
|
||||
// if (timeDiff < chatSlowTime && !_clientManager.Get(event.getPlayer()).GetRank().has(Rank.HELPER))
|
||||
// {
|
||||
//
|
||||
// }
|
||||
|
||||
ClientClan client = Get(event.getPlayer());
|
||||
|
||||
if (client == null)
|
||||
|
@ -513,11 +513,14 @@ public class Gameplay extends MiniPlugin
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
if (event.getItem().getType() == Material.SAPLING)
|
||||
if (event.getItem().getType() == Material.TNT)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
}
|
||||
if (event.getItem().getType() == Material.SAPLING)
|
||||
{
|
||||
event.setCancelled(true);
|
||||
} }
|
||||
}
|
||||
|
||||
// @EventHandler(priority = EventPriority.LOWEST)
|
||||
|
Loading…
Reference in New Issue
Block a user