Jump to content
  • 0

Only use of certain commands in certain worlds



1 answer to this question

Recommended Posts

  • 0

You can use skript, worldguard, or your permission plugin to do this. There are probably other ways to do this too but here are 3 ways. 

With Skript

on command "/command1" or "/command2":
	if player's world is not "world":
		cancel event
		send "You can only use this command in the survival world"

You can have a skript something like this. This makes it that the command /command1 and /command2 can only be used in the world called "world". If you don't know how to add skripts, here is how. First install the Skript plugin then restart the server. Then go to plugins > skript > scripts. Make a file here called blockedcommands.sk. it can be called anything but just has to end in .sk. Then in game do /sk reload blockedcommands or whatever you named it.


With WorldGuard

There is a blocked-cmds flag that you can use with WorldGuard. You would either need to set it in config or use the global region. I'm actually not sure if the global region is per world or per server. But if its per world, you can do this. /rg f __global__ blocked-cmds /command1,/command2. This will block these 2 commands in the global region. You can see a list of other WorldGuard flags here.


With a Permission Plugin

With LuckPerms, you can do /lp group <group> permission set <permission node> true world=<world name>
With Permissions Ex, you can do /pex group <group add <permission node> <world>

If the commands don't have a permission nodes, you will probably have to use one of the other methods I mentioned above. 

Discord - Tarna256#8675

In-game name - _Tarna_

Follow @Tarna_256 on Twitter


[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...