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 PlayerCommand { public boolean doCommand(Player sender, String[] args) throws SQLException { if (args.length != 0) return false; Location wback = Database.getWBack(sender); if (wback == null) { sender.sendMessage("You have never teleported anywhere with NewSimpleWaypoints."); return true; } Database.setWBack(sender, sender.getLocation()); sender.teleport(wback); return true; } }