#disable commands in regions

1 messages · Page 1 of 1 (latest)

tough zephyr
#

hello, im losing braincells from this but im trying to disable certain commands in a specific region, is there anyone that can help me out with this?

Using Multiverse for worlds and regions

just feel like ive tried everything that people have suggested online, nothing seems to work, just going round in circles at this point, tried alot more then showed here but just dont know what to do, if anyone can help out that'd be great thank you in advance

    if command contains "/":
        if player is in world "events":
            send "command not allowed in events"
            cancel event

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

on world change:
    if player is in world "events":
        message "test for events check"```
long vessel
#

Can you be more specific than “nothing seems to work”?

tough zephyr
#

So i can disable the command entirely but not in certain worlds, cant seem to check both if player in world and if command contains

#

idk if that made sense

long vessel
#

What

#

Only one condition works at a time?

tough zephyr
#

i want to disable a command only in a certain world or region

fossil flicker
#

the first code seems to be fine

tough zephyr
#

doesnt work tho

fossil flicker
#
    if command contains "/spawn" or "/back":
        if player is in world "events":
            cancel event
            send "&cYou cannot send commands here!"```
tough zephyr
#

Nope, still sends me to spawn

#

see what i mean, i dont get it

fossil flicker
#

well then you must not be in the world events, because it works fine for me

tough zephyr
#

lemme send a vid

south oriole
fossil flicker
#

ah, my bad, but it shouldnt influence the outcome as it would be an error

tough zephyr
#

ye i figured

#

but when i just do:

    if player is in world "events":
        message "test for events check"```
it knows its in events world and sends the message
#

¯_(ツ)_/¯

south oriole
#

try like

  player's world = "events"
  broadcast "e"```
tough zephyr
#

nope

south oriole
#

try broadcasting "%player's world%"

#

if its <none> then it doesn't understand the expression

tough zephyr
#

am i missing something or?

south oriole
#

guessing thats an essentials thing or smthn

#

normally broadcast "%player's world%" makes the server just send the actual world name in chat

#

without any colour codes or [Broadcast] prefix

#

swap broadcast with send ig

tough zephyr
#

still same thing, lemme see if its a placeholder thing

south oriole
#

never messed with placeholders so idk how any of em work

tough zephyr
#

i really dont know at this point

long vessel
# tough zephyr

Is this essentials’ /broadcast? They meant use the skript line broadcast “some stuff here”

long vessel
tough zephyr
#

nope, still nothing

#

player's world = "spawn" isnt even picking up

long vessel
#

That will never pass