Allow ops to use minecraft commands
This commit is contained in:
parent
b782f5ced9
commit
a0e79d87a2
@ -146,11 +146,14 @@ public class Chat extends MiniPlugin
|
|||||||
if (event.getMessage().toLowerCase().startsWith("/me ")
|
if (event.getMessage().toLowerCase().startsWith("/me ")
|
||||||
|| event.getMessage().toLowerCase().startsWith("/bukkit")
|
|| event.getMessage().toLowerCase().startsWith("/bukkit")
|
||||||
|| event.getMessage().toLowerCase().startsWith("/minecraft"))
|
|| event.getMessage().toLowerCase().startsWith("/minecraft"))
|
||||||
|
{
|
||||||
|
if (!event.getPlayer().isOp())
|
||||||
{
|
{
|
||||||
event.getPlayer().sendMessage(F.main(getName(), "Nope, not allowed!"));
|
event.getPlayer().sendMessage(F.main(getName(), "Nope, not allowed!"));
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void lagTest(PlayerCommandPreprocessEvent event)
|
public void lagTest(PlayerCommandPreprocessEvent event)
|
||||||
|
Loading…
Reference in New Issue
Block a user