mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 14:15:50 +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
|
@EventHandler
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||||
|
if (!event.getPlayer().equals(player))
|
||||||
|
return;
|
||||||
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
if (event.getAction() == Action.LEFT_CLICK_BLOCK) {
|
||||||
waypoints.add(new Waypoint(event.getClickedBlock().getLocation()));
|
waypoints.add(new Waypoint(event.getClickedBlock().getLocation()));
|
||||||
player.sendMessage(ChatColor.GREEN + "Added a waypoint.");
|
player.sendMessage(ChatColor.GREEN + "Added a waypoint.");
|
||||||
|
@ -50,4 +50,8 @@ public class Waypoints extends Trait {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final InstanceFactory<WaypointProvider> providers = DefaultInstanceFactory.create();
|
private static final InstanceFactory<WaypointProvider> providers = DefaultInstanceFactory.create();
|
||||||
|
|
||||||
|
static {
|
||||||
|
providers.register(LinearWaypointProvider.class, "linear");
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user