Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5895

PlayerChangedWorldEvent#getFrom is the same as PlayerChangedWorldEvent#getPlayer#getWorld

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • N/A

    • git-Spigot-ad703da-e2403a3 (1.16.1)
    • Yes

      PlayerChangedWorldEvent#getFrom is the same as PlayerChangedWorldEvent#getPlayer#getWorld, wheras previous behaviour was not so.
      I have attached a plugin in which listens to PlayerChangedWorldEvent:

      @EventHandler
      public void onPlayerChangeWorld(final PlayerChangedWorldEvent event) {
       getLogger().log(Level.INFO, "From: " + event.getFrom().getName());
       getLogger().log(Level.INFO, "Current: " + event.getPlayer().getWorld().getName());
      }

      The expected output of "from" should be that of the origin world.

            Unassigned Unassigned
            andrewandy Andrew Wong
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: