/**
* Prevents the leash use
*
* @param e
*/
@EventHandler(priority = EventPriority.LOW)
public void onLeashUse(final PlayerUnleashEntityEvent e) {
if (DEBUG) {
plugin.getLogger().info(e.getEventName());
}
if (inWorld(e.getEntity())) {
if (e.getPlayer() != null) {
Player player = e.getPlayer();
if (actionAllowed(player, e.getEntity().getLocation(),SettingsFlag.LEASH)) {
return;
}
Util.sendMessage(player, ChatColor.RED + plugin.myLocale(player.getUniqueId()).islandProtected);
e.setCancelled(true);
e.getPlayer().updateInventory();
}
}
}
IslandGuard.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:askyblock
作者:
评论列表
文章目录