cat.nyaa.nyaacore.utils.TeleportUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rpgitems Show documentation
Show all versions of rpgitems Show documentation
The legacy RPGItems continues. (fork)
package cat.nyaa.nyaacore.utils;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerTeleportEvent;
import java.util.List;
public final class TeleportUtils {
@Deprecated
public static boolean Teleport(Player player, Location loc) {
if (!player.isOnline() || loc == null || loc.getWorld() == null) {
return false;
}
player.setFallDistance(0);
player.teleport(loc, PlayerTeleportEvent.TeleportCause.PLUGIN);
return true;
}
@Deprecated
public static void Teleport(List players, Location loc) {
for (Player p : players) {
Teleport(p, loc);
}
}
}