[PLUG-344] consume items Created: 12/Aug/19 Updated: 13/Aug/19 Resolved: 13/Aug/19 |
|
| Status: | Resolved |
| Project: | SpigotPlugins |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | XiaoWen | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | 1.14.3, Consumables, Plugin | ||
| Environment: |
Java 8 Eclipse IDE 1.14.3 spigot-api-1.14.3-R0.1-SNAPSHOT-shaded |
||
| Version: | 1.14.3 |
| Guidelines Read: | Yes |
| Description |
|
How to write plugins that use items to get money and consume items @SuppressWarnings("deprecation") @EventHandler public void onPlayerInteract(PlayerInteractEvent e) { Player p = e.getPlayer(); if((e.getAction() == Action.RIGHT_CLICK_AIR) || ((e.getAction() == Action.RIGHT_CLICK_BLOCK)) && p.getItemInHand().equals(paper10)) { Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "eco give " + p.getName() + " 10"); } } paper10 is the new item I made in the plugin |
| Comments |
| Comment by md_5 [ 13/Aug/19 ] |
|
This is a bug tracker not a support forum |