package net.benjidial.nswp.commands; import net.benjidial.nswp.Database; import org.bukkit.entity.Player; import org.bukkit.Location; import java.sql.SQLException; public class WaypointBack extends WaypointCommand { public CompletionType getCompletionType() { return CompletionType.None; } public boolean body(Player player, String[] args) throws SQLException { if (args.length != 0) return false; Location wback = Database.getWBack(player); if (wback == null) player.sendMessage("You have not teleported to any waypoints."); else { Database.setWBack(player, player.getLocation()); player.teleport(wback); } return true; } }