mirror of
https://github.com/songoda/UltimateKits.git
synced 2024-11-08 11:41:28 +01:00
Fix invalid crate usage.
This commit is contained in:
parent
af788389cd
commit
c0bfa2431a
@ -98,11 +98,13 @@ public class InteractListeners implements Listener {
|
||||
@EventHandler
|
||||
public void onCrateClick(PlayerInteractEvent event) {
|
||||
// Would be better to use NBT to make the item persist over aesthetic changes.
|
||||
// Yes you really should have used NBT. In fact we have an API for this in SongodaCore...
|
||||
|
||||
// Filter physical actions (pressure plates, buttons)
|
||||
if (event.getAction() == Action.PHYSICAL
|
||||
|| event.getItem() == null
|
||||
|| event.getItem().getType() == CompatibleMaterial.AIR.getMaterial())
|
||||
|| event.getItem().getType() == CompatibleMaterial.AIR.getMaterial()
|
||||
|| CompatibleMaterial.getMaterial(event.getItem()) != CompatibleMaterial.CHEST)
|
||||
return;
|
||||
|
||||
ItemStack item = event.getItem();
|
||||
|
Loading…
Reference in New Issue
Block a user