InventoryClickEvent getAction

Discussion in 'Plugin Development' started by knokko, Jan 12, 2019.

Thread Status:
Not open for further replies.
  1. Offline


    I was writing a plug-in, and it appeared that a function broke that requires the getAction method of the InventoryClickEvent. The problem is that the getAction method always returns PLACE_ALL, no matter what I do in my inventory.

    To test this, I created a very small test plug-in:
    import org.bukkit.Bukkit;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    public class TestPlugin extends JavaPlugin implements Listener {
        public void onEnable() {
            Bukkit.getPluginManager().registerEvents(this, this);
        public void onInvClick(InventoryClickEvent event) {
            System.out.println("action is " + event.getAction() + " and slot type is " + event.getSlotType());
    I ran my craftbukkit server with only this plug-in, and according to the console output from the onInvClick, the action of every fired event is still always PLACE_ALL.
    Does anyone know more about this? Is this method deprecated or something?

    EDIT: I forgot to mention I use the latest build of 1.12.2
    Last edited: Jan 13, 2019
  2. Offline


    Allright, since nobody seems to know anything about this and the getAction() used to work, I assume this is some kind of bug. If so, what would be the best place to report it?

    And I remember that this worked fine in the past, so is it possible to obtain an old craftbukkit build?
  3. Offline


    @knokko What version are you using?
  4. Offline



    I use the latest build of 1.12.2 (I also tried 1.12 and 1.12.1, the same happens in those versions).
  5. Offline


    Have you tried shiftclicking items or ctrlclicking them?
  6. Offline



    For control clicking, the result is also PLACE_ALL (just like all other actions).
    Shift clicking first 2 events, where both actions are PLACE_ALL.
Thread Status:
Not open for further replies.

Share This Page