Skip to content

Commit

Permalink
Fix 2771 (#3128)
Browse files Browse the repository at this point in the history
While this issue stems from a deeper problem, at least we can get event-item working properly for now.
  • Loading branch information
APickledWalrus authored Jul 10, 2020
1 parent 9eb94fa commit eb3f240
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/ch/njol/skript/classes/data/BukkitEventValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -644,13 +644,6 @@ else if (hand == EquipmentSlot.OFF_HAND)
}
}, 0);
// PlayerInteractEvent
EventValues.registerEventValue(PlayerInteractEvent.class, Block.class, new Getter<Block, PlayerInteractEvent>() {
@Override
@Nullable
public Block get(final PlayerInteractEvent e) {
return e.getClickedBlock();
}
}, 0);
EventValues.registerEventValue(PlayerInteractEvent.class, ItemType.class, new Getter<ItemType, PlayerInteractEvent>() {
@Override
@Nullable
Expand All @@ -659,6 +652,13 @@ public ItemType get(final PlayerInteractEvent e) {
return item == null ? null : new ItemType(item);
}
}, 0);
EventValues.registerEventValue(PlayerInteractEvent.class, Block.class, new Getter<Block, PlayerInteractEvent>() {
@Override
@Nullable
public Block get(final PlayerInteractEvent e) {
return e.getClickedBlock();
}
}, 0);
EventValues.registerEventValue(PlayerInteractEvent.class, Direction.class, new Getter<Direction, PlayerInteractEvent>() {
@Override
@Nullable
Expand Down

0 comments on commit eb3f240

Please sign in to comment.