Remove weird @s selector handling

This commit is contained in:
William committed 2022-08-27 00:55:44 +01:00
1 parent bee1c811b2
commit 9bdf67c250
1 file changed
+1 -1
@@ -199,7 +199,7 @@ public class TeleportManager {
@NotNull String targetPlayer,
@NotNull OnlineUser requester,
final boolean timed) {
final Optional<OnlineUser> localPlayer = !playerName.equals("@s") ? plugin.findPlayer(playerName) : Optional.of(requester);
final Optional<OnlineUser> localPlayer = plugin.findPlayer(playerName);
final Optional<Position> localPositionTarget = localPlayer.map(OnlineUser::getPosition);
if (localPositionTarget.isPresent()) {
return teleportPlayerByName(playerName, localPositionTarget.get(), requester, timed);