Skip to content

Commit

Permalink
Fix NPE relating to hopper minecarts
Browse files Browse the repository at this point in the history
  • Loading branch information
boxbeam committed Dec 14, 2021
1 parent b47f692 commit 2294f97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion res/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: RedLib
main: redempt.redlib.RedLib
version: 2021-12-13 21:44
version: 2021-12-14 20:29
author: Redempt
api-version: 1.13
load: STARTUP
4 changes: 2 additions & 2 deletions src/redempt/redlib/protection/ProtectionRegistrations.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ private static Block getBlock(Hanging hanging) {

private static Block getBlock(Inventory inv) {
InventoryHolder holder = inv.getHolder();
if (holder instanceof StorageMinecart) {
return ((StorageMinecart) holder).getLocation().getBlock();
if (holder instanceof Minecart) {
return ((Minecart) holder).getLocation().getBlock();
}
if (holder instanceof DoubleChest) {
return ((DoubleChest) holder).getLocation().getBlock();
Expand Down

0 comments on commit 2294f97

Please sign in to comment.