Skip to content

Commit

Permalink
Prevent InventoryHolder -> X chaining (#6171)
Browse files Browse the repository at this point in the history
* Prevent InventoryHolder -> X chaining
  • Loading branch information
sovdeeth authored Nov 25, 2023
1 parent 7178dc4 commit 4cc45e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ public DefaultConverters() {}
if (holder instanceof DoubleChest)
return holder.getInventory().getLocation().getBlock();
return null;
});
}, Converter.NO_CHAINING);

// InventoryHolder - Entity
Converters.registerConverter(InventoryHolder.class, Entity.class, holder -> {
if (holder instanceof Entity)
return (Entity) holder;
return null;
});
}, Converter.NO_CHAINING);

// Enchantment - EnchantmentType
Converters.registerConverter(Enchantment.class, EnchantmentType.class, e -> new EnchantmentType(e, -1));
Expand Down

0 comments on commit 4cc45e7

Please sign in to comment.