Plugin Help Spawns

Discussion in 'Plugin Help/Development/Requests' started by CeeTox, Sep 4, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    CeeTox

    If have kinda a hub server.. But i doesnt work well... I want to make so you spawn in the hub every time you join the server AND new players will also spawn there... I kinda now how to do that. But then when they take a portal to maybe KitPVP. Then when they die there, then they should not be teleported back to the Hub. But to the spawn in KitPVP... Please help me with a plugin or something :)


    I dont really understand all that help you posted.. Maybe if there was a plugin?
     
    Last edited: Sep 10, 2016
  2. Create a sort of a warp API and add the players in an ArrayList/HashMap/put a string in the config/MySQL... in which world they are currently. When a player respawns use the PlayerRespawnEvent and set the respawnLocation to the warp point (you must create on for every spawn). So basically the method of the API should return a Location which you build from world, x, y, z, (optional : yaw, pitch). If you have any questions, post them. Hope I could help you.
     
  3. @Daniel #Play4Austria, No need to go to such extreme measures... No need for MySQL, Or a "warp API", Just one simple @CeeTox are you using BungeeCord? If so, Go to the Spigot forums, This isn't really the place for Bungee since we don't support offline mode which BungeeCord requires.

    If you're not using Bungee, This is very simple indeed. Simply create an onCommand method which I am assuming you know how to do.

    Make the command something similar to, /sethub, or /setlobby. Something along those lines.

    Code:
    public boolean onCommand(blahh blahh blah) {
        if (commandLabel.equalsIgnoreCase("setlobby){
          }
    }
    now, We want to set config values of the lobby's location. So, use getConfig#set method, for example. In the config create 4 values.

    REMEMBER WHEN SETTING THE WORLD, USE getConfig().set("lobby.world or whatever", Player#getWorld().getNAME!!!! NOT Player#getWorld, add getName!!!!

    config.yml:
    Code:
    lobby_x:
    lobby_y:
    lobby_z:
    lobby_world:
    
    now use, getConfig().set("lobby.x", Player#getLocation().getX());

    and do the same for world, y, and z, co-ords.

    Next, We want to create an Event for things like:
    Join, Death, and a lobby/hub command so your players can /hub or /lobby to be teleported there.

    Code:
    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent e){
    Player p = e.getPlayer();
    p.teleport(getConfig().getDouble("blah blah blah");
    }
    
    Also create one for methods like:
    Death, etc.
     
    Last edited: Sep 9, 2016
  4. i don´t think he uses bungeecord.
    also i think he needs some sort of plugin that teleports people for the same reason that the fakt is (i understood it like that) : he has "minigame-worlds", but i´m not so sure..
     
Thread Status:
Not open for further replies.

Share This Page