Improves and fixes comments for listeners

Removes the enableBungee check in the BungeeCordListener as it should only be listening if the option is enabled anyway
Improves the checking for players teleporting from the end
This commit is contained in:
2021-10-13 16:46:30 +02:00
parent bf7a10636e
commit 44325eeb6a
9 changed files with 53 additions and 31 deletions

View File

@ -44,4 +44,17 @@ public class FromTheEndTeleportation {
return this.exitPortal;
}
@Override
public int hashCode() {
return teleportingPlayer.hashCode();
}
@Override
public boolean equals(Object other) {
if (!(other instanceof FromTheEndTeleportation otherTeleportation)) {
return false;
}
return teleportingPlayer.equals(otherTeleportation.teleportingPlayer);
}
}