#how to disable world edit commands

1 messages · Page 1 of 1 (latest)

remote galleon
#
    if event-commandsender contains "//":
        send "&cYou can't do this" to player
        cancel event``` I tried to do this but it doesn't work no errors but I can still use world edit commands
glass spear
#

...

#

what do you think event-commandsender is

#

It isn't the command

#

full command is the command

remote galleon
#

idk what event-commandsender is

#

oh

#

ok

#

it didn't work

#
    if full command contains "//":
        send "&cYou can't do this" to player
        cancel event``` no errors but I can still use world edit commands
glass spear
#

"%full command%" then

#

and debug it

remote galleon
#

ok

#

so it didn't work so I debugged it and it printed nothing on command: send "&chi" to player if "%full command%" contains "//": send "&cYou can't do this" to player cancel event

#

nothing in the skript works

#

ok

#

I think I fixed the skript file

#

it just prints "hi" tho

#

so the condition isn't passing

#

why

#

rrl6???

merry lodge
#

But..but.. remove world edit permission on player?

remote galleon
#

huh

merry lodge
#

I don’t understand your logic 🫤🫤

remote galleon
#

why did my code unsave

merry lodge
remote galleon
#

oh

#

why did my code stop saving

merry lodge
#

And

glass spear
#

Might be both

remote galleon
merry lodge
#

On Chat Message

glass spear
#

or I might be incorrect, I don't think I've used it ever

remote galleon
#

I have to re skript it all again

merry lodge
merry lodge
#

From us

remote galleon
#

my skript was 800 lines

#

its not entirely gone

merry lodge
#

“you’ll have to rewrite” 5 lines?

remote galleon
#

bruh

#

thats not the skript

merry lodge
#

🫣🫣

#

judging by the name of this chat, all your scripts are “very useful”

remote galleon
#

huh

merry lodge
#

set player's group to "default"

#

I haven’t comments

remote galleon
#

whats wrong with that

merry lodge
#

By the way, shoving everything into one file is not a very cool idea, editing and reloading is problematic, or just be smart and use comments to separate different functions

remote galleon
#

oh

merry lodge
remote galleon
#

o

merry lodge
#

And if he bought donate, and after then join to server first time…he lose donate

remote galleon
#

anyways

remote galleon
remote galleon
remote galleon
#

that is not a event value for on command:

#

nor would it work on on chat:

merry lodge
#

command /rules:

remote galleon
merry lodge
#

Here are 2 tips for you: 1 sort your scripts into separate files or NORMALLY separate them from comments. 2. don’t create scripts for things that CAN BE DONE WITHOUT THEM

remote galleon
#

ok

merry lodge
remote galleon
#

its ok

merry lodge
#

I saw so many useless scripts that will create a load that players will complain about, / the rules are in some plugins in the same cmi or essentials, using luskperms or some kind of Ultra permissions you already give the player a default group, minus the line

remote galleon
#

that is 2 lines

#

and am using my own /rules

merry lodge
#

command /jumps: cooldown: 0.1 second cooldown message: &cWait %remaining time% seconds

Why do we need a delay that in fact won’t exist?

remote galleon
#

it is a temporary delay

#

like

#

I will change it

#

in the future

merry lodge
merry lodge
#

Download Plugin

#

Start server

#

then the folder will be created

#

and there are files in the folder

#

in cmi there is a ready-made rules file, you open and write there the rules that you want players to see when /rules

#

In essentials similar mechanics

remote galleon
#

ok

merry lodge
#

or in the config file there are lines or a separate file

remote galleon
#

I can't find it

merry lodge
remote galleon
#

gsit

merry lodge
#

clearly I understand my dialogue is one-sided, I write and you don’t even understand what’s happening

remote galleon
#

Gsit

#

is a plugin

merry lodge
#

So what

merry lodge
#

Are you kidding me right now or really don’t understand anything?

remote galleon
#

what

#

I understand stuff

#

ur just confusing

merry lodge
#

I clearly explained to you how to relieve the load and remove from the script what exists on its own, and in the end you write me the name of the plugin to sit down

remote galleon
#

oh

merry lodge
#

it's like: I ask blue or yellow? and you answer me “square”

remote galleon
#

oh

merry lodge
#

I ask cmi or essentials? You: gsit

remote galleon
#

what is cmi

#

and I dont have essentials

merry lodge
remote galleon
#

I dont have cmi

merry lodge
remote galleon
#

I hate essentials

#

I removeed it

#

it is terrible

#

and ruins everytihng

merry lodge
remote galleon
#

ok

merry lodge
#

that's why cmi exists

remote galleon
#

how is cmi better

merry lodge
remote galleon
#

no

#

can i just get help with the skript problem

merry lodge
#

this is not for me, I’m going to sleep, I realized that I’m uselessly groping here

remote galleon
#

groping???

merry lodge
#

Sorry

#

Not that word

#

I'm crucifying myself here

remote galleon
#

what does that mean

merry lodge
remote galleon
#

oh

merry lodge
remote galleon
#

ok

merry lodge
#

just go to bed, it's late

#

😴😴

remote galleon
#

time zones

#

exist

#

5PM isn't late

merry lodge
#

😦😦

#

ok then I'll go to bed, good luck

remote galleon
#

ok

#

rrl6

glass spear
#

yes?

remote galleon
#

pls help

#

why condition not pass

willow zodiac
#

because it doesnt

#

x doesnt equal y, or whatever it is

remote galleon
#

ok

#

so

#

how I fix

glass spear
#

make x = y or whatever it is

remote galleon
#

bruh

#

u know the problem

#

why u guys keep saying whatever

#

I gave u all the info

#

and that doesn't help

willow zodiac
#

Your code is something like this: if red = blue: broadcast “success!”
We’ve told you exactly why it doesnt work: red and blue are clearly not the same, which is why the condition fails

remote galleon
#

that is not my code

#
    send "&chi" to player
    if "%full command%" contains "//":
        send "&cYou can't do this" to player
        cancel event```
willow zodiac
#

Okay

#

So clearly that condition fails

#

So debug the full command

remote galleon
#

ok

#
    send "%full command%" to player
    if "%full command%" contains "//":
        send "&cYou can't do this" to player
        cancel event```
#

bruh

#

oh

#

ok

#

so when i use world edit

#

its

#
  • a slash
#

waht

#
  • e
#

t-e

#

-e

#
  • e
glass spear
#

hyphen?

remote galleon
#

it removes a /

#

every time I Do a command

#

so like //set air is /set air

#

and /kill is kill

#

-/

#
  • bullet point : D
glass spear
#

mhmm

remote galleon
#

so

#

I can do

#

if command contains "/"

#

it works

#

yayyyayayya

glass spear
#

yup

#

See? Debugging isn't so difficult and it would've saved you so much time

remote galleon
#

bruh

#

I didn't know

#

to broadcast the full command

#

u just told me to debug

#
    if "%full command%" contains "/":
        if event-player is not "AxolotlGamer2364":
            send "&cYou can't do this" to player
            cancel event```
#

also

#

I dont need to stringify it

glass spear
#

Okay

remote galleon
#

it told me

#

when I reloaded scripts

glass spear
#

👍

wanton hearth
#

this broke my server every time a send a command it sends you cant do this

maiden remnant
#

maybe you should rethink your solution to this problem
you are blocking every command that starts with // but not all worldedit commands start with // (see here: https://worldedit.enginehub.org/en/latest/commands/)

therefore you aren’t blocking worldedit commands at all, why don’t u just not give the player any permissions to use worldedit?

willow zodiac
#

cause that would be too easy

maiden remnant
#

you really shouldn’t overcomplicate this