mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 02:55:45 +01:00
Merge branch 'master' of github.com:CitizensDev/Citizens2
This commit is contained in:
commit
bf7b868a09
@ -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