How to check Playerworld?

Discussion in 'Spigot Plugin Help' started by Eptix, May 30, 2016.

  1. Hello,

    How can i check the world from the player?

    Example:

    Player join the map named 'FFA' and i would like to give him items.

    I think i must do it like this:

    if(p.onWorld ..... ) {
    }

    but i think its not right its only an example from my own.
    Can anybody help me?

    Sorry for my bad English.
     
  2. Why do you need a plugin for this? Just place a command block with a kit inside it
    And wrong section.
     
  3. If you want it to be like your way this code might help you

    Code (Text):
    Player p;
    if ((p.getLocation().getWorld() ... ) {
       //Give kits
       //code
     
  4. this thread gave me aids.
     
  5. God help us all..

    Btw, to get the player's world (method 1):

    Code (Java):

    <insert Player casting here>
    <whatever player is cast to>.getWorld().getName().equalsIgnoreCase("FFA"));
    The other method is:

    Code (Java):

    <insert Player casting ghere>
    <whatever player is cast to>.getLocation().getWorld().getName().equalsIgnoreCase("FFA"));
     
    #6 boolean, May 30, 2016
    Last edited: May 30, 2016
  6. Heres what I did:

    (1) To see what world a player is in (if you have essentials), type /whois (username) and it will display.

    (2) To give items when a player joins world, use this plugin: https://www.dropbox.com/s/lnovv4lhgl0vujn/World Command 1.0.jar

    (3) To give items when a player first joins a world (and only for the first join), use this: https://www.dropbox.com/s/bw75lxnla150bl4/FirstWorldJoinCommand.jar?dl=0

    Both of these plugins were custom made on request, the first one is by MnMaxon, and the second by TimTower.
    Hope this helps!

    Regards, James