-
-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
After that 05d8a7c updates - The store's creation stopped working when clicking on the block due to changes in the PlayerListener:
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockState;
import org.bukkit.block.Chest;
import org.bukkit.block.Sign;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -168,6 +169,11 @@ public void onClick(final PlayerInteractEvent event) {
}
}
}
if(shop == null && b.getBlockData() instanceof Chest) {
return new AbstractMap.SimpleImmutableEntry<>(shop, InteractionClick.CONTAINER);
}
This is not described anywhere, but in order for the creation to work, I had to add in interactions.yml: STANDING_LEFT_CLICK_CONTAINER: TRADE_UI
Metadata
Metadata
Assignees
Labels
No labels