[SPIGOT-1157] InventoryClickEvent isRightClick() always returns false while in creative. Created: 30/Aug/15 Updated: 18/Sep/15 Resolved: 18/Sep/15 |
|
| Status: | Closed |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Jos Roossien | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 1 |
| Labels: | Craftbukkit, bug, event | ||
| Environment: |
Java 7 |
||
| Plugin: | Spigot |
| Description |
|
When right clicking while you're in creative the output of InventoryClickEvent is invalid. When executing the code below all of the values are exactly the same when you left and right click. @EventHandler private void invClick(InventoryClickEvent event) { Bukkit.broadcastMessage("" + event.isRightClick()); /* false */ Bukkit.broadcastMessage("" + event.getClick().isRightClick()); /* false */ Bukkit.broadcastMessage(event.getClick().toString()); /* CREATIVE */ Bukkit.broadcastMessage(event.getAction().toString()); /* PLACE_ALL */ } |
| Comments |
| Comment by Jos Roossien [ 31/Aug/15 ] |
|
Ah that's a shame. |
| Comment by Black Hole [ 31/Aug/15 ] |
|
This is because it's actually an InventoryCreativeEvent, which is always using ClickType.CREATIVE. The server don't have any information if the client had used right click: |
| Comment by SpigotMC [ 30/Aug/15 ] |
|
Your build is not the latest and therefore may be the reason you are having this issue. Spigot is 2 version(s) behind. CraftBukkit is 3 version(s) behind. This message was automatically generated and is not guaranteed to be a solution to your issue. |