Teleport to DIfferent Worlds

Discussion in 'Spigot Plugin Development' started by HeroVerseWizard, Jun 7, 2017.

  1. I am using MultiVersePlugin and ran into some issues
    Code (Text):
            double x = 3604;
                        double y = 40;
                        double z = -4071;
                        p.teleport(new Location(Bukkit.getWorld("spawn"), x, y, z));
    I tried tping players to this coord
    Players in that world get TPd
    However, player in other worlds dont how can i make it so everyone gets tpd to a coordinate which is in another world?
     
    • Optimistic Optimistic x 1
  2. Not sure why that's not working.. it should be. There is no special way teleport to another world. Try debugging your world, it might be null.
     
    • Optimistic Optimistic x 1
  3. Maybe because you only teleport one player.... (Logical if you look at the code -_-)
     
    • Optimistic Optimistic x 1
  4. Make a null checking to "Bukkit.getWorld("spawn");"
     
  5. Logically if u even think of it...
    it can be a special loop where i am storing an ArrayList in a single var and tping them
    So... Its teleporting one by one bruvv


    @Herison
    It is like I am in the world it teleports me to the correct coords, But If i am in another world it doesnt
     
    • Optimistic Optimistic x 1
  6. Maybe use brains and post the whole freakin code. We help based on what we receive of code. We are not wizards with some magic.
     
    • Optimistic Optimistic x 1
  7. Hmm it's strange. Are u using varible for the world name when you teleport or the "spawn" is hardcoded?

    If you load the world when the server starting up, just add to your plugin.yml: load: POSTWORLD
     
  8. @TheBlackTeddy dude chill the whole code wont benefit anyone whatsoever and my problem isnt with teleporting multiple players in one location; by looking at my wording anyone can figure out what the whole code is supposed to do. Rather than telling me to have a brain, go first learn Java and understand it then go to speech therapy classes to be a wizard and please if you dont understand or can't interpret English, I am deeply sorry for your current state my friend
    Rather than not openly express your mistakes and propagating the fault into others is REALLY unethical please learn it by now

    @Herison Sorry for that now come to happy business. It's quite weird actually. Btw using a variable for the world name.
    load POSTWORLD tried doesnt work for some reason.
     
    • Optimistic Optimistic x 1
  9. Hmm, just try to debug it.
    Use: Bukkit.getLogger().info("DEBUG WORLD:" + worldvariablehere);
    What do you see in the log/console?
     
  10. Or you can sysout it fyi ;P
    but the console is saying they got tpd
    but they didnt
     
    • Optimistic Optimistic x 1
  11. Hmm weird :D Is there plugins on the server too?
     
  12. Yeah you want help but without telling it? Wow such a good way! We are not wizards like you think. We can't help fix your problem with one one piece of code that only teleports the P variable...
     
    • Optimistic Optimistic x 1
  13. @TheBlackTeddy stop chucking tantrums for no reason man. Why do you need useless codes which wont be needed. This is about teleporting player or players thorugh different worlds. I have shown what I have tried
    Contradictory statements: I did want help and i did tell my scenario and giving the loop is pointless considering ppl here have that basic knowledge (Well i see im wrong), if you dont understand the problem why r you here? You brought the term wizardry here, by general knowledge anyone can pick the loop off by seeing my wording and . IT DOESNT matter if i am teleporting one or multiple players or ONE single player. its there to show I tried having the name of the world so people dont raise it up here. YOU ARE NOT THE WIZARD! That's the truth, I am sorry. Never knew there are dumb people like you calling others with no brains. The Wizards are anyone who can offer help without creating a commotion like you... I do respect everyone here. "If you understand the core of Java", you couldve understood the problem, quoted by Yours TheBlack Teddy ;)


    @Herison Ty For your help! Ill be soon marking this thread as solved because salt is pouring over me like heck
     
    • Agree Agree x 2
    • Optimistic Optimistic x 1
  14. You only show a couple lines of code and you wonder how people can't help? Maybe use your brains and take for example this, you want help but you are not telling the problem... HOW ARE WE THAN SUPPOSED TO HELP? And you are calling others dumb while you have a problem with some basic java... People help based on how you tell the problem and the information you provide... Because yeah I have tried looping through players and a single player and teleported them to different worlds and works fine for me. So if you want to get some damn help, provide some damn code.
     
  15. ok thats enough spigot for today
     
  16. TomTheDeveloper

    Supporter

    Hmm, it is indeed weird that it isnt working. If you can't find your issue, then here are a few things you could try:
    • Is the world you are teleporting the players to loaded when you perform this method?
    • Try loading the chunk to where you teleport the players to manually? (This can also be easily tested by putting a second player on the position of teleportation. )