@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
public static void handleSpawnFail(HologramLine parentPiece) { logDebug(Level.WARNING, "Coulnd't spawn entity for this hologram: " + parentPiece.getParent().toString()); }
@Override @Deprecated public void setTouchHandler(TouchHandler handler) { if (size() > 0) { TouchableLine line0 = ((TouchableLine) getLine(0)); if (handler != null) { line0.setTouchHandler(new OldTouchHandlerWrapper(this, handler)); } else { line0.setTouchHandler(null); } } }
textLine.setTouchHandler(new TouchHandler() {
ItemLine icon = hologram.appendItemLine(new ItemStack(Material.SUGAR)); icon.setPickupHandler(new PickupHandler() {
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onChunkUnload(ChunkUnloadEvent event) { for (Entity entity : event.getChunk().getEntities()) { if (!entity.isDead()) { NMSEntityBase entityBase = nmsManager.getNMSEntityBase(entity); if (entityBase != null) { ((CraftHologram) entityBase.getHologramLine().getParent()).despawnEntities(); } } } }
textLine.setTouchHandler(new TouchHandler() {
@Override public void d(EntityHuman human) { if (human.locY < this.locY - 1.5 || human.locY > this.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < this.locY - 1.5 || human.locY > this.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < this.locY - 1.5 || human.locY > this.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }
@Override public void d(EntityHuman human) { if (human.locY < super.locY - 1.5 || human.locY > super.locY + 1.0) { // Too low or too high, it's a bit weird. return; } if (parentPiece.getPickupHandler() != null && human instanceof EntityPlayer) { itemPickupManager.handleItemLinePickup((Player) human.getBukkitEntity(), parentPiece.getPickupHandler(), parentPiece.getParent()); // It is never added to the inventory. } }