KaiKikuchi / QuickShop

A shop plugin for Bukkit
47 stars 41 forks source link

Shop signs not refreshing on inventory close #129

Closed PyvesB closed 7 years ago

PyvesB commented 7 years ago

Hello again KaiKikuchi,

Thank you for your quick response regarding the previous issue I opened.

While testing your fix for #128 (seems to be working fine), I also tried the following new feature:

Now shop signs are automatically updated when the shop chest interface is closed

I did not manage to make this work, for instance when adding items into a chest and closing the chest inventory interface. I am using a fresh 0.9.32 installation, with Minecraft 1.12-pre6. Nothing unexpected in the logs.

Cheers,

Pyves

KaiKikuchi commented 7 years ago

Hey. Before pushing the update I tested it on v1.11.2 and works fine.

PyvesB commented 7 years ago

Strange, just tested in 1.11.2, also having issues with it. The "Selling X" does not update after closing the chest inventory.

KaiKikuchi commented 7 years ago

Sorry but I've tested it again, and it still works fine. Probably some other plugin is preventing the InventoryCloseEvent to be correctly handled by QuickShop. Or the event is not fired at all. Anyway, if the click on the sign works, then I think it's enough.

PyvesB commented 7 years ago

I had a quick look into the source code, and you use a condition similar to the following:

if (this.display) {
    inventoryListener = new InventoryListener(this);
    Bukkit.getServer().getPluginManager().registerEvents(inventoryListener, this);
}

Therefore, if display-items is set to false in the configuration (which is the case by default), the new feature that acts when an inventory is closed will not work.

KaiKikuchi commented 7 years ago

Hey, thank you. I was quite busy so I could not check what was wrong earlier, but you saved my time.

I had a quick look into the source code, and you use a condition similar to the following



^ I actually did 2 years ago. Also I added the auto-sign update already and it broke between minecraft versions... and of course I didn't remember about it at all. Sorry I have a very bad memory.
KaiKikuchi commented 7 years ago

Fixed in version 0.9.33

PyvesB commented 7 years ago

Just tested version 0.9.33. Everything looks fine, thanks! ;-)