1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Execute a console command in a specific world

Discussion in 'Skript' started by SkriptLearner, Nov 10, 2019.

  1. SkriptLearner

    SkriptLearner Member

    Joined:
    Jul 21, 2019
    Messages:
    7
    Likes Received:
    0
    ,I saw another post like this but no one gave them a good answer, and I'm pretty sure I did it recently.

    What I want is to (as the title says) execute a console command in a specific world. So basically what I want to do is use the clone command run by console but I want it to be run in a specific world.
    Code (Text):
    1. #I have tried this code:
    2.  
    3. execute console command "/clone -16 70 3 -22 59 -32 -1 59 -31" in "findthebutton" world
    I'm pretty sure I did something like that and it worked (but that exact code doesn't work), I have also tried rearranging some of the wording.

    It may be I had some skript addon. Tell me if there is a way to do it even if it uses an addon.

    2 options I will not use (there are reasons for these):

    -Putting a command block
    -Teleporting a player to the world then forcing them to run the command

    If I haven't made it clear, basically I have multiple worlds in the same server (I use multiverse) and when you execute a console command it automatically executes in the original world, so if I, for example, summoned a zombie at certain coordinates it would automatically do it in the original world, but I want it to do the command in a different world so that it'd summon in that world and not the original one. Also these commands use vanilla Minecraft coordinates so using coordinates that have the world in won't work.

    Thanks.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,088
    Likes Received:
    146
    Minecraft commands do not work per world.
    Why? Because Minecraft technically only has one world, and that world has multiple dimensions (nether, end). Multiple "worlds" is a spigot/bukkit thing, therefor the commands from Minecraft will only work in the main world.
     
  3. SkriptLearner

    SkriptLearner Member

    Joined:
    Jul 21, 2019
    Messages:
    7
    Likes Received:
    0
    Yes and thanks but when you activate a command block in a world it runs as a console command in that world. I'm pretty sure there is a way in skript that when you use execute console command, it will run it as if it is a command block in that world. Sorry if I'm not making sense
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,088
    Likes Received:
    146
    Command blocks dont run "console" commands, they run internal commands, and im pretty sure the command block internally figures out which world/dimension the block is in.

    Skript cant run console commands per world.
     
Loading...