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

Get world in world change event

Comments in 'Plugin Development' started by jjmc, Oct 19, 2015.

  1. jjmc
    Offline

    jjmc New Member

    Joined:
    Oct 18, 2015
    Posts:
    41
    Hi,
    I'm developing a plugin that you can fly in some worlds, but not in all.
    I'm using the EntityLevelChangeEvent.
    How can I get the world name of the world where the player is teleporting (not the world name of the current world).
    I've tried to do it with $player->getLevel()->getName();, but it gives me the name of the world where the player is coming from and not where he is teleporting.
  2. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
  3. jjmc
    Offline

    jjmc New Member

    Joined:
    Oct 18, 2015
    Posts:
    41
    Thank you, that works.

Share This Page

Advertisement