#error message "add "permission.node.spawn2" to permissions of player"

1 messages · Page 1 of 1 (latest)

mild saffron
#

pretty sure you need permissions plugin

burnt lodge
#

i have luckperms

#

and i have added permissions.node.spawn2 for long and still dont work

lucid owl
#

if player can use the command

#

oh cuz u dont want them to be able to use the command without okay

burnt lodge
#

yea

lucid owl
#

altirnative option

#

is that u can set a variable to 1 when player can use /spawn2
t

#

and make a
if {value} is 1:
on the /spawn2 command

#

then just set the {variable} to 0 so the player cant tp when the {value} is not 1

burnt lodge
#

ehm

#

im new to this so idk where to put them

lucid owl
#

lemme do it

#

1sec

burnt lodge
#

k

lucid owl
#

command /spawn2:
trigger:
if {value} is 1:
teleport player to {spawn2_location}
send "&aYou have teleported to spawn2!"
else:
send "cant use this command"

burnt lodge
#

k

#

imma try

lucid owl
#

not finished uh

#

i missclicked

#

then on your on load you put:
set {value} to 1
instead of add permission to player

#

and where do u remove the permission ?

burnt lodge
#

luckperms web?

lucid owl
#

no i mean

#

in ur code

burnt lodge
#

add "permission.node.spawn2" to permissions of player ?

lucid owl
#

dont u remove the permission to /spawn2 after they do the command ?

burnt lodge
#

no i want them to get the permission to get /spawn2 and /spawn

lucid owl
#

so u dont even need to set permission

#

if u dont set permission for the command they have the permission to execute it by default

burnt lodge
#

but i want them to get the permission when they teleport there

lucid owl
#

just do
command /spawn2:
trigger:
teleport player to {spawn2_location}
send "&aYou have teleported to spawn2!"

burnt lodge
#

k

burnt lodge
#

bc its apart of the game

lucid owl
#

like u need to unlock the ability to use the command ?

burnt lodge
#

wtf

#

the server closed when i right clicked the nether star

lucid owl
#

ye it crash sometimes

#

dont worry

#

but so ?

burnt lodge
lucid owl
#

ooh okay i see

#

waitasec

burnt lodge
#

on load:

This variable stores the location for /spawn2.

Replace X, Y, Z, and WORLD with the actual coordinates and world name for the spawn2 location.

set {spawn2_location} to location (200.500, 70, 200.500) in world "world"

on right click holding a nether star:
if player is holding a nether star named "&eGalaxy Portal":
if {nstar} is set:
teleport player to {nstar}
send "&aUse &e/spawn &ato teleport to the original place and use &e/spawn2 &ato teleport to the place you are in now."
remove 1 nether star named "&eGalaxy Portal" from player's inventory
set {spawn2perm} to 1
else:
send "&cThe Galaxy Portal location hasn't been set yet."

command /spawn2:
trigger:
teleport player to {spawn2_location}
send "&aYou have teleported to spawn2!"

#

?

lucid owl
#

on load:

This variable stores the location for /spawn2.

Replace X, Y, Z, and WORLD with the actual coordinates and world name for the spawn2 location.

set {spawn2_location} to location (200.500, 70, 200.500) in world "world"

on right click holding a nether star:
if player is holding a nether star named "&eGalaxy Portal":
if {nstar} is set:
teleport player to {nstar}
send "&aUse &e/spawn &ato teleport to the original place and use &e/spawn2 &ato teleport to the place you are in now."
remove 1 nether star named "&eGalaxy Portal" from player's inventory
set {spawn2perm} to 1
else:
send "&cThe Galaxy Portal location hasn't been set yet."

command /spawn2:
trigger:
if {spawn2perm} is 1:
teleport player to {spawn2_location}
send "&aYou have teleported to spawn2!"
else:
send "You havent unlocked that yet"

#

try this

#

and put the {spawn2perm} to 0 by default

#

in your variable file

#

wait actually

burnt lodge
#

wheres the variable file-

lucid owl
#

wait i made a mistake

burnt lodge
#

k

lucid owl
#

on load:

This variable stores the location for /spawn2.

Replace X, Y, Z, and WORLD with the actual coordinates and world name for the spawn2 location.

set {spawn2_location} to location (200.500, 70, 200.500) in world "world"

on right click holding a nether star:
if player is holding a nether star named "&eGalaxy Portal":
if {nstar} is set:
teleport player to {nstar}
send "&aUse &e/spawn &ato teleport to the original place and use &e/spawn2 &ato teleport to the place you are in now."
remove 1 nether star named "&eGalaxy Portal" from player's inventory
set {spawn2perm.%player%} to 1
else:
send "&cThe Galaxy Portal location hasn't been set yet."

command /spawn2:
trigger:
if {spawn2perm.%player%} is 1:
teleport player to {spawn2_location}
send "&aYou have teleported to spawn2!"
else:
send "You havent unlocked that yet"

#

here

#

do u have a
on first join:

#

event

#

on ur code ?

burnt lodge
#

the Galaxy Portal interact is the skript were talking about

#

do u mean Galaxy Portal interact?

lucid owl
#

nah every skript folder u have

#

is there a on first join ?

burnt lodge
#

yea actually

lucid owl
#

so u need to add an event on the

#

on first join:

#

which is
set {spawn2perm.%player%} to 0

#

and then ur good

#

actually u need to initialise your variable to 0, cuz that not your first join on the server

burnt lodge
#
    send "&aWelcome %player% to &eBoxRavenz &ahope you have fun! &9and dont forget to join our discord with /discord, and read the rules with /rules!!!" to player
    ````
lucid owl
#

yeah

burnt lodge
#

thats the skript on the first join

lucid owl
#

add a new line

#

set {spawn2perm.%player%} to 0

burnt lodge
#

k

lucid owl
#

and make a temporary command

burnt lodge
#
    send "&aWelcome %player% to &eBoxRavenz &ahope you have fun! &9and dont forget to join our discord with /discord, and read the rules with /rules!!!" to player
    
set {spawn2perm.%player%} to 0```
#

like this?

lucid owl
#

like
command /temp:
trigger:
set {spawn2perm.%player%} to 0

#

then execute the /temp command, it will set ur variable to 0 for you

burnt lodge
#

so they have to run it first?

lucid owl
#

nop

#

they just have to join

#

but wont work for u cause u already joined ur server

#

so it wont set your variable to 0

lucid owl
burnt lodge
#

there are many other people that have joined the server without this

#

what abt on join?

lucid owl
#

if {spawn2perm.%player%} is 1:
pass
else:
set {spawn2perm.%player%} to 0

#

then u disconnect reconnect

#

and should be good

burnt lodge
#

but whats aliases

lucid owl
#

wym ?

burnt lodge
#

i reloaded all and it said reloading aliases and skript and yea

lucid owl
#

so ur good

#

arent u ?

burnt lodge
#

but wait if someone who has /spawn2 and leaves and rejoin dont they not have it

lucid owl
#

if they already have it we dont set the value to 0

burnt lodge
#

les go ur the best🔥🔥🔥

lucid owl
#

work ?

burnt lodge
#

yess

lucid owl
#

nice !

burnt lodge
#

but the server closes everytime

lucid owl
#

u use the neth star ?

burnt lodge
#

yea

lucid owl
#

lemme read the code upper

burnt lodge
#
  permission: op
  permission message: "&cYou don't have access to use this!"
  trigger:
    if {nstar} is set:
      send "&cYou have already made a location!"
    else:
      set {nstar} to player's location
      send "&aSuccessfully set Nether Star location to your current location."




on load:
  # This variable stores the location for /spawn2.
  # Replace X, Y, Z, and WORLD with the actual coordinates and world name for the spawn2 location.
  set {spawn2_location} to location (200.500, 70, 200.500) in world "world"

on right click holding a nether star:
  if player is holding a nether star named "&eGalaxy Portal":
    if {nstar} is set:
      teleport player to {nstar}
      send "&aUse &e/spawn &ato teleport to the original place and use &e/spawn2 &ato teleport to the place you are in now."
      remove 1 nether star named "&eGalaxy Portal" from player's inventory
      set {spawn2perm.%player%} to 1
    else:
      send "&cThe Galaxy Portal location hasn't been set yet."




command /spawn2:
  trigger:
    if {spawn2perm.%player%} is 1:
      teleport player to {spawn2_location}
      send "&aYou have teleported to spawn2!"
    else:
      send "&cYou havent unlocked that yet!"




command /delnstarloc:
  permission: op
  permission message: "&cYou don't have access to use this!"
  trigger:
    if {nstar} is set:
      delete {nstar}
      send "&aSuccessfully deleted Nether Star location."
    else:
      send "&cYou haven't set a location yet!"```

heres the whole skript
lucid owl
#

thks

#

actually there is no reason for u server to crash on the code

burnt lodge
#

can i show the console?

lucid owl
#

ye ofc

#

what does it says when crash

burnt lodge
#

wait i have the crash file

#

server tick loop?

lucid owl
#

mmh

#

k

#

try to put somes "wait 1 tick" on your code

#

it's cuz u make the server execute too much action per ticks

#

as i understand

burnt lodge
#

how many seconds is 20 tick

lucid owl
#

1

#

1 sec is 20 ticks

#

so 1tick is nothing

burnt lodge
#

oh-

#

k

#

but where in the code?

lucid owl
#

lemme place them

burnt lodge
#

k thanks

#

but the server closes also when i try to open a crate with excellentcrates

lucid owl
#
  permission: op
  permission message: "&cYou don't have access to use this!"
  trigger:
    if {nstar} is set:
      send "&cYou have already made a location!"
    else:
      set {nstar} to player's location
      send "&aSuccessfully set Nether Star location to your current location."




on load:
  # This variable stores the location for /spawn2.
  # Replace X, Y, Z, and WORLD with the actual coordinates and world name for the spawn2 location.
  set {spawn2_location} to location (200.500, 70, 200.500) in world "world"

on right click holding a nether star:
  if player is holding a nether star named "&eGalaxy Portal":
    if {nstar} is set:
      teleport player to {nstar}
      wait 1 tick
      send "&aUse &e/spawn &ato teleport to the original place and use &e/spawn2 &ato teleport to the place you are in now."
      remove 1 nether star named "&eGalaxy Portal" from player's inventory
      wait 1 tick
      set {spawn2perm.%player%} to 1
    else:
      send "&cThe Galaxy Portal location hasn't been set yet."




command /spawn2:
  trigger:
    if {spawn2perm.%player%} is 1:
      teleport player to {spawn2_location}
      send "&aYou have teleported to spawn2!"
    else:
      send "&cYou havent unlocked that yet!"




command /delnstarloc:
  permission: op
  permission message: "&cYou don't have access to use this!"
  trigger:
    if {nstar} is set:
      delete {nstar}
      send "&aSuccessfully deleted Nether Star location."
    else:
      send "&cYou haven't set a location yet!"```
#

try this

lucid owl
#

u have a skript attached to the crates systems ?

burnt lodge
#

no?

lucid owl
#

try to do the nether star thing to see if that it

burnt lodge
#

k

#

did u add in 2 places

#

?

#

the "wait 1 tick"

lucid owl
#

ye

burnt lodge
#

k

#

imma test now

#

less goo

#

imma message u in dm if it fail again

#

but now it works awesome

lucid owl
#

and crates still crash ?

burnt lodge
#

thank you so much for your help

lucid owl
#

np !

burnt lodge
#

nope

#

not anymore

lucid owl
#

weird but nice

burnt lodge
#

tysm for ur help

lucid owl
#

ur welcome !