disabled usage of /minecraft: commands in 1..8

This commit is contained in:
Cheese 2015-11-11 12:49:19 +11:00
parent 4eaa165826
commit a47752cfe2

View File

@ -134,9 +134,10 @@ public class Chat extends MiniPlugin
public void preventMe(PlayerCommandPreprocessEvent event)
{
if (event.getMessage().toLowerCase().startsWith("/me ")
|| event.getMessage().toLowerCase().startsWith("/bukkit"))
|| event.getMessage().toLowerCase().startsWith("/bukkit")
|| event.getMessage().toLowerCase().startsWith("/minecraft"))
{
event.getPlayer().sendMessage(F.main(getName(), "No, you!"));
event.getPlayer().sendMessage(F.main(getName(), "Nope, not allowed!"));
event.setCancelled(true);
}
}