@EventHandler
public void EntityClick(PlayerInteractAtEntityEvent e)
{
Player p = e.getPlayer();
if(e.getRightClicked() instanceof ArmorStand){
ArmorStand clickedA = (ArmorStand) e.getRightClicked();
if(clickedA.getPassenger() == null){
for(attractie att : Main.r.Attracties.values()){
for(ArmorStand a : att.getSeats())
{
if(a.getLocation().getX() == clickedA.getLocation().getX() &&
a.getLocation().getY() == clickedA.getLocation().getY() &&
a.getLocation().getZ() == clickedA.getLocation().getZ())
{
if(att.allowSit == true){
e.setCancelled(true);
p.teleport(clickedA);
clickedA.setPassenger(p);
att.addPassagier(p, clickedA);
}
return;
}
}
}
}
}
}
EntityClick_Listener.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:Achtbaan
作者:
评论列表
文章目录