You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ability to make the plugin only work on certain worlds #67
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
On my server we have a vanilla world and a mcmmo (modded) world. I'm wondering if it will be possible for you to make it so the custom items can't be made on certain worlds. For instance we don't want anyone to be able to make the special armour on the vanilla world since it's supposed to just be vanilla.
Describe the solution you'd like
A clear and concise description of what you want to happen.
The ability to make a world blacklist on which worlds you can't use the /recipes command and you can't craft the custom items
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
We have a plugin called HPWP / PerWorldPlugins which lets us stop most plugins from being used on the vanilla world. It was previously possible to drag the items out of the UI on there because while the plugin was disabled it still let you type the /recipes command. We had trouble disabling the /recipes command on the vanilla world so I did it with the plugin MyCommand but now on the modded world it doesn't let you type /recipes to open the book anymore. I managed to bypass that kind of though because I made a /craftbook command that gives you the recipe book as an item. But that doesn't stop the fact that you can still make the items on the world we don't want them made on. (We are too new a server to be able to consider doing the bungee yet)
Additional context
Add any other context or screenshots about the feature request here.
Oh ty! I never noticed the Conditions button before. That's pretty cool
because now we have made it so the armour can only be made in the swamp
biome too, but about the using the /recipes command on the other world it
still makes it awkward since you can drag the items into your inventory,
but the /craftbook command I had to make is good for now
hmm yeah that is quite awkward. Can you set permissions per world? That would be my idea. Give players on your modded world the permission to use /recipes. And block it on the vanilla. Not sure how that could be achieved, but just an idea.
Yeah, we did it in LuckPerms, but I'm pretty sure that it didn't work
Within MyCommand I did these
wrong-recipes:
command: /recipes
type: RUN_CONSOLE
runcmd:
- "tell $player Please do not try to access /recipes on this world."
allowed_worlds:
- vanilla
- vanilla_nether
- vanilla_the_end
and now when /recipes is used on the correct world it says "This command is
not accessible from this world"
That's a problem I'm still looking into but it seems that mycommand is the
best way I can sort that out without an option within custom crafting to
disable /recipes on specific worlds
and I gave the permission
craftbook:
command: /craftbook
type: RUN_AS_OPERATOR
runcmd:
- "/customcrafting give $player customcrafting:recipe_book"
permission-required: true
permission-node: mycommand.cmd.craftbook
to people only on the mcmmo one
This is the command that gives them the book item
But we have another problem at the moment because the recipe book seems to
have broken itself
(I got the version from Patreon) and on trying to open the book it says this
[09:50:39 WARN]: [CustomCrafting] Plugin CustomCrafting v2.16.1.0 generated
an exception while executing task 3545
java.lang.ArrayIndexOutOfBoundsException: Index 27 out of bounds for length
27
at java.util.Arrays$ArrayList.get(Arrays.java:4164) ~[?:?]
at net.minecraft.core.NonNullList.get(NonNullList.java:47)
~[patched_1.17.1.jar:git-Airplane-34]
at
org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryCustom$MinecraftInventory.getItem(CraftInventoryCustom.java:105)
~[patched_1.17.1.jar:git-Airplane-34]
at
org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventory.getItem(CraftInventory.java:49)
~[patched_1.17.1.jar:git-Airplane-34]
at
me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.renderButton(GuiUpdate.java:165)
~[wolfyutilities-1.7.4.0.jar:?]
at
me.wolfyscript.utilities.api.inventory.gui.GuiUpdate.setButton(GuiUpdate.java:99)
~[wolfyutilities-1.7.4.0.jar:?]
at
me.wolfyscript.customcrafting.gui.recipebook.MenuMain.onUpdateAsync(MenuMain.java:56)
~[customcrafting-spigot-2.16.1.0.jar:?]
at
me.wolfyscript.utilities.api.inventory.gui.GuiWindow.openInventory(GuiWindow.java:185)
~[wolfyutilities-1.7.4.0.jar:?]
at
me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$callUpdate$1(GuiWindow.java:175)
~[wolfyutilities-1.7.4.0.jar:?]
at
org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
~[patched_1.17.1.jar:git-Airplane-34]
at
org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[patched_1.17.1.jar:git-Airplane-34]
at
com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[patched_1.17.1.jar:git-Airplane-34]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[?:?]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
or
[10:02:03 WARN]: [CustomCrafting] Plugin CustomCrafting v2.16.1.0 generated
an exception while executing task 15809
java.lang.ArrayIndexOutOfBoundsException: null
But I was able to sort that problem out by removing the recipe_book.json
and changing the name of recipe_book_old to replace it
(Somehow the categories all duplicated themselves)
Activity
WolfyScript commentedon Oct 4, 2021
Have you tried the world condition of the recipes? It allows you to enable recipes in selected worlds.
jackysacki commentedon Oct 5, 2021
WolfyScript commentedon Oct 6, 2021
hmm yeah that is quite awkward. Can you set permissions per world? That would be my idea. Give players on your modded world the permission to use /recipes. And block it on the vanilla. Not sure how that could be achieved, but just an idea.
jackysacki commentedon Oct 7, 2021