Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Hilariously, air is considered a block with no location?
Browse files Browse the repository at this point in the history
wtf sponge
  • Loading branch information
mcmonkey4eva committed Mar 27, 2017
1 parent 1a758ab commit 9cd7d96
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -88,6 +88,10 @@ public void onRightClickBlock(InteractBlockEvent.Secondary evt, @Root Player pla
PlayerRightClicksBlockScriptEvent event = (PlayerRightClicksBlockScriptEvent) clone();
event.internal = evt;
event.player = new PlayerTag(player);
if (!evt.getTargetBlock().getLocation().isPresent()) {
// Sponge is dumb!
return;
}
event.location = new LocationTag(evt.getTargetBlock().getLocation().get());
if (evt.getInteractionPoint().isPresent()) {
event.intersection = new LocationTag(evt.getInteractionPoint().get());
Expand Down

0 comments on commit 9cd7d96

Please sign in to comment.