I wanted to test some stuff out so I wrote a small plugin. All it consists of is a Listener class with some logic. What the plugin does is, when you scroll using the mouse wheel and go to the far end of the quick bar, it will translate all the rows in the inventory one down. This allows extending the inventory quickbar from 9 to 36 items. This is mainly useful in creative where you otherwise have to switch between window panes all the time. Code: Code: package com.bergerkiller.bukkit.qe; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerItemHeldEvent; import org.bukkit.inventory.ItemStack; public class QEListener implements Listener { @EventHandler(priority = EventPriority.LOWEST) public void onHeldItemChange(PlayerItemHeldEvent event) { boolean next = false; boolean previous = false; if (event.getPreviousSlot() == 0 && event.getNewSlot() == 8) { previous = true; } else if (event.getPreviousSlot() == 8 && event.getNewSlot() == 0) { next = true; } if (next || previous) { ItemStack[] items = event.getPlayer().getInventory().getContents(); ItemStack[] newItems = new ItemStack[items.length]; final int rowCount = 4; final int rowMask = 0x3; for (int row = 0; row < rowCount; row++) { int newrow = row; if (previous) { newrow = (row - 1) & rowMask; } else if (next) { newrow = (row + 1) & rowMask; } for (int i = 0; i < 9; i++) { newItems[newrow * 9 + i] = items[row * 9 + i]; } } event.getPlayer().getInventory().setContents(newItems); } } } I don't have time to manage this let alone manage another dev-bukkit page for it, so any takers willing to continue it/use it? No idea how useful people will find this though. Note: There is no need to put me down as an author, this would be your own plugin
Wrong section XD, but does this already have a plugin page ? or does one need to be made. Im willing to take this on , do u mind if its open sourced?
jacklin213 I am all-right with anything. The point is, I can't publish it, and I noticed that none like it was found on dev-bukkit either. It's a plugin request as in: Someone make this into a proper plugin.
jacklin213 You have all permission to use the code I posted and make it into a plugin. You don't have to put my name on it, consider it your own. (no, seriously, writing that code took me < 2 minutes, it's yours...)
Man thank your for the code, made me open my eyes to a new world XD. If I wanted to make a scroll icon for the quick bar I would need spout wouldn't I ?
jacklin213 Well you can handle the WindowClickEvent in Bukkit to handle the clicking of an item. Then you could use certain item types for the icons. But yeah, if you want to add a new widget or want to use arrow keys, you will need to use Spout for that. Spout plugin has keyboard events you can use for this.
jacklin213 Yes, because I don't think the minecraft client sends messages of keyboard input to the server. (Unless this was added in some version, of course)