blob: f0b9dcd8ba74cfde7600e642c3bc340f39b8634b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package net.benjidial.nswp.commands;
import net.benjidial.nswp.Database;
import net.benjidial.nswp.Waypoint;
import org.bukkit.entity.Player;
import java.sql.SQLException;
public class SaveWaypoint extends WaypointCommand {
public CompletionType getCompletionType() {
return CompletionType.None;
}
public boolean body(Player player, String[] args) throws SQLException {
if (args.length != 1)
return false;
Waypoint waypoint = new Waypoint(args[0], player.getLocation());
Database.addWaypoint(player, waypoint);
return true;
}
}
|