Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler(priority = EventPriority.MONITOR)
- public void itemPickup(InventoryClickEvent event) {
- World world = event.getWhoClicked().getWorld();
- CtmMap data = instance.maps.get(world.getUID());
- if (data != null) {
- if (event.getResult() != Event.Result.DENY) {
- if (event.getCurrentItem().getType() == Material.WOOL) {
- // PICKING UP
- instance.getLogger().fine("Picking up wool");
- } else if (data.isMetal(event.getCurrentItem().getType())) {
- instance.getLogger().fine("Picking up metal");
- } else if (event.getCursor().getType() == Material.WOOL) {
- // PUTTING DOWN
- instance.getLogger().fine("putting down wool");
- } else if (data.isMetal(event.getCursor().getType())) {
- instance.getLogger().fine("putting dwon metal");
- } else {
- instance.getLogger().fine("something else" + event.getCurrentItem() + event.getCursor() + event.isLeftClick() + event.isRightClick() + event.isShiftClick());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement