ChestShop-authors / ChestShop-3

ChestShop - the chest & sign shop plugin for Minecraft Servers running Bukkit/Spigot/Paper
https://dev.bukkit.org/projects/chestshop
GNU Lesser General Public License v2.1
275 stars 175 forks source link

Cannot cancel shop creation using PreShopCreationEvent #480

Open azzztec opened 2 years ago

azzztec commented 2 years ago

What is happening?

In this case shop is created anyway: @EventHandler public void preShopCreation(PreShopCreationEvent e) { e.setCancelled(true); }

What did you expect to happen?

Shop should not be created.

Plugin Version

3.12

Plugin Config

default 3.12 config

Server Version

paper-1.17.1-295.jar

Server Log

default paper logs

What other plugins are you running?

only ChestShop

Agreements

Additional context

Maybe you have an actual discord channel where i can ask such questions? Because the link in spigot page have been expired.

Phoenix616 commented 2 years ago

What do you expect cancelling to do? Because cancelling the event will indeed cancel the subsequent logic (e.g. the ShopCreatedEvent).

If you expect other things to happen you need to do that yourself (e.g. the event provides a method to change the sign's lines)