[SPIGOT-2228] Invoking Dispenser.dispense or Dropper.drop will not spawn entity Created: 27/Apr/16 Updated: 03/May/16 Resolved: 02/May/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | mukiu | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | 1.9, Craftbukkit | ||
Environment: |
OS: Linux 3.19.0-22-generic |
Plugin: | none |
Description |
I'm writing a plugin which invokes the method of BlockState. |
Comments |
Comment by mukiu [ 03/May/16 ] |
Confirmed asynchronous invocation in my code, sorry for disturbing. |
Comment by md_5 [ 02/May/16 ] |
@EventHandler public void interact(PlayerInteractEvent event) { if ( event.getPlayer().getItemInHand().getType() != Material.BONE || event.getHand() != EquipmentSlot.HAND ) { return; } BlockState b = event.getClickedBlock().getState(); if ( b instanceof Dispenser ) { ( (Dispenser) b ).dispense(); } else if ( b instanceof Dropper ) { ( (Dropper) b ).drop(); } Cannot reproduce with above code. |
Comment by mukiu [ 27/Apr/16 ] |
Please notice that Dispenser.dispense or Dropper.drop doesn't mean static methods of those classes, but methods of instances by calling block.getState() and checking cast. |