/**
* Handle interaction with armor stands V1.8
* Note - some armor stand protection is done in IslandGuard.java, e.g. against projectiles.
*
* @param e
*/
@EventHandler(priority = EventPriority.LOW, ignoreCancelled=true)
public void onPlayerInteract(final PlayerInteractAtEntityEvent e) {
if (DEBUG) {
plugin.getLogger().info("1.8 " + e.getEventName());
}
if (!IslandGuard.inWorld(e.getPlayer())) {
return;
}
if (e.getRightClicked() != null && e.getRightClicked().getType().equals(EntityType.ARMOR_STAND)) {
if (actionAllowed(e.getPlayer(), e.getRightClicked().getLocation(), SettingsFlag.ARMOR_STAND)) {
return;
}
e.setCancelled(true);
Util.sendMessage(e.getPlayer(), ChatColor.RED + plugin.myLocale(e.getPlayer().getUniqueId()).islandProtected);
}
}
IslandGuard1_8.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:askyblock
作者:
评论列表
文章目录