mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-03 18:07:26 +02:00
Bugfix
This commit is contained in:
parent
164d7467ad
commit
5f8c8aafc3
@ -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