-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bug: confirmedConfirmed bugs in EssentialsX.Confirmed bugs in EssentialsX.
Description
Type of bug
Compatibility issue
/ess dump all output
Error log (if applicable)
No response
Bug description
When running /tphere on a player the TeleportWarmupEvent will have getTeleporter() and getTeleportee() returning the same, teleported player, instead of different players.
https://github.com/EssentialsX/Essentials/blob/2.x/Essentials/src/main/java/net/ess3/api/events/teleport/TeleportEvent.java#L31
The problem seems to be caused by the shorthand constructor, which doesn't distinguish the fields.
So there might be more commands affected, which should be checked.
Steps to reproduce
- Have a least 2 people online.
- Teleport the other player via /tphere
- Via the output for the code below.
@EventHandler
public void onWarmup(TeleportWarmupEvent event) {
System.out.println("Teleporter: " + event.getTeleporter());
System.out.println("Teleportee: " + event.getTeleportee());
}
Expected behaviour
For the event getTeleporter() should return the caller of the command.
Actual behaviour
For the event getTeleporter() returns the target of the command.
Metadata
Metadata
Assignees
Labels
bug: confirmedConfirmed bugs in EssentialsX.Confirmed bugs in EssentialsX.