mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 20:25:19 +01:00
Merge branch 'master' of github.com:CitizensDev/Citizens2
This commit is contained in:
commit
59ec5c4154
@ -36,6 +36,8 @@ public class LinearWaypointProvider implements WaypointProvider {
|
||||
@EventHandler
|
||||
@SuppressWarnings("unused")
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
if (!event.getPlayer().equals(player))
|
||||
return;
|
||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||
waypoints.add(new Waypoint(event.getClickedBlock().getLocation()));
|
||||
player.sendMessage(ChatColor.GREEN + "Added a waypoint.");
|
||||
|
@ -50,4 +50,8 @@ public class Waypoints extends Trait {
|
||||
}
|
||||
|
||||
private static final InstanceFactory<WaypointProvider> providers = DefaultInstanceFactory.create();
|
||||
|
||||
static {
|
||||
providers.register(LinearWaypointProvider.class, "linear");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user