@EventHandler(priority = EventPriority.HIGHEST)
public void onCommandPre(PlayerCommandPreprocessEvent ev) {
if (this.am.isInGame(ev.getPlayer())) {
// Only if the player is in game
boolean c = true;
// Is it allowed?
for (String com : this.allowedCommands) {
if (ev.getMessage().toLowerCase().startsWith("/" + com)) {
c = false;
}
}
if (c)
// If the command is not allowed, notify the user
s(ev.getPlayer(), this.config.get("no_command_in_game"));
ev.setCancelled(c);
}
}
Main.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:defend-the-village
作者:
评论列表
文章目录