CraftBook 3

CraftBook 3

139k Downloads

Not working protect sign in worldguard region; Custom-recipes duplication error

LadyCailinBot opened this issue · 7 comments

commented

CRAFTBOOK-3349 - Reported by BoomEaro

I'm using worldguard 6.2.1 and the latest version of Craftbook 3.9.
Signs in a foreign region can be used by any player, even when all settings are in the config.
check-worldguard-flags: true
advanced-block-checks: true
pedantic-block-checks: true
Even so, any player can, for example, open and close the gate.

If you make your crafting recipe, and then reboot the plugin (/cb reload), the plugin will start to write the craft already there.

[13:37:28] [Server thread/ERROR]: [CraftBook] Failed to load recipe! Is it incorrectly written?
[13:37:28] [Server thread/ERROR]: [CraftBook] java.lang.IllegalStateException: Duplicate recipe ignored with ID craftbook:decor25
at net.minecraft.server.v1_12_R1.CraftingManager.a(CraftingManager.java:149)
at org.bukkit.craftbukkit.v1_12_R1.inventory.CraftShapedRecipe.addToCraftingManager(CraftShapedRecipe.java:58)
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.addRecipe(CraftServer.java:1097)
at com.sk89q.craftbook.mechanics.crafting.CustomCrafting.addRecipe(CustomCrafting.java:84)
at com.sk89q.craftbook.mechanics.crafting.CustomCrafting.enable(CustomCrafting.java:47)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.setupCraftBook(CraftBookPlugin.java:578)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.reloadConfiguration(CraftBookPlugin.java:1110)
at com.sk89q.craftbook.bukkit.commands.TopLevelCommands$Commands.reload(TopLevelCommands.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:528)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:516)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:471)
at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:409)
at com.sk89q.craftbook.bukkit.CraftBookPlugin.onCommand(CraftBookPlugin.java:789)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:54)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141)
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:649)
at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:635)
at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444)
at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407)
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
at java.lang.Thread.run(Unknown Source)

I'm using the latest version of spigot 1.12.2
(Sorry for my english)

commented

Comment by me4502

That second part is due to a limitation in Spigot, it can’t be worked around without Spigot offering an API to remove recipes.

I’ll have a look at the first part when I get a chance, however last I tried it was working. Maybe try it without pedantic block checks, but keep advanced block checks on.

commented

Comment by BoomEaro

I did not initially use pedantic-block-checks: true
But I decided to include, to understand finally, that it still does not work.

commented

Comment by BoomEaro

@me4502
I did not initially use pedantic-block-checks: true
But I decided to include, to understand finally, that it still does not work.

commented

Comment by BoomEaro

And about the recipes.
Can after rebooting the plugin, disable reboot of the recipes so that they do not break?

commented

Comment by me4502

There isn’t a way to differentiate between a reload and a restart

commented

Comment by me4502

For the WorldGuard issue - seems it's stopped cancelling sign interactions. I've overridden it so that if obey-worldguard is enabled, it'll also check with WorldGuard even with advanced block checks enabled.

As for the other - I've added a warning for the few cases that can be detected, but that's really the best that can be done with the current Spigot limitations.

commented

Comment by BoomEaro

@me4502

Yes, everything works now!
Thank you!