Load

Discussion in 'Plugin Development' started by LandinosMC, Jun 28, 2017.

Thread Status:
Not open for further replies.
  1. I save World In sethub.java and how to load that saved world in hub.java and lobby.java

    I Use player.chat("/mvtp RainbowMoutains"); (That Is My Hub World)
    But I want to share This To Public And To be world What Admin sets with /sethub

    How to load that saved world
    Maybe:
    player.chat("/mvtp + "<How to load saved World?>");

    READ
    Just Tell Me How to load Saved World
    And Can it be loaded here: player.chat("/mvtp + "<HERE>");

    Thanks
     
  2. Offline

    timtower Administrator Administrator Moderator

    @LandinosMC 1. Use Server#dispatchCommand instead of Player#chat
    2. How are you saving it?
     
  3. I saving it how @Horsey Tell Me
    Use player#getWorld(); to get the world a player is in.
    Then save that world's name by world#getName();
    Then use Bukkit.getWorld(worldName); to get the world.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @LandinosMC But do you save it in the config? Because to get the world name again you need to save it in the config.
     
  5. idk What You Mean
    What Config?
    My Plugin Don't Extract to folder if you mean that
    Its Just staying as a .jar file
     
    Last edited: Jun 28, 2017
  6. Offline

    timtower Administrator Administrator Moderator

    @LandinosMC You need to save the worldname in the config or you won't be able to use it.
    If you have done that then we can help with this issue again.
     
  7. Offline

    timtower Administrator Administrator Moderator

  8. Like This
    this.getConfig().options().copyDefaults(true)
     
  9. Offline

    timtower Administrator Administrator Moderator

    @LandinosMC You don't need to reload your config though.
    You don't need that line either to be honest.
     
Thread Status:
Not open for further replies.

Share This Page