Skript only work in certain world?

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

bebeli555

Member
Feb 6, 2020
28
0
0
25
So i have multiple worlds on my server but id like this skript only to work on a world named "prisons" so how can i do that so the skript wouldnt affect the other worlds only work in the prisons world? Heres the skript:

on break of iron ore:
cancel event
set event-block to air
give 1 of iron ingot to player
make console execute "eco give %player% 0.8"

on break of gold ore:
cancel event
set event-block to air
give 1 of gold ingot to player
make console execute "eco give %player% 0.8"

on break of diamond ore:
cancel event
set event-block to air
give 1 of diamond to player
make console execute "eco give %player% 0.8"

on break of emerald ore:
cancel event
set event-block to air
give 1 of emerald to player
make console execute "eco give %player% 0.8"

on break of coal ore:
cancel event
set event-block to air
give 1 of coal to player
make console execute "eco give %player% 0.8"

on break of stone:
cancel event
set event-block to air
 
For example,
Code:
on break of iron ore:
  event-world is "prisons" #this is an in-line condition
  cancel event
  set event-block to air
  give 1 of iron ingot to player
  add 0.8 to balance of player #you don't need to use console commands if you have Vault installed; Skript supports Vault-based Economy plugins
 
Status
Not open for further replies.