Merge branch 'master' of github.com:CitizensDev/Citizens2

This commit is contained in:
aPunch 2012-02-28 01:42:23 -06:00
commit bf7b868a09
2 changed files with 6 additions and 0 deletions

View File

@ -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.");

View File

@ -50,4 +50,8 @@ public class Waypoints extends Trait {
}
private static final InstanceFactory<WaypointProvider> providers = DefaultInstanceFactory.create();
static {
providers.register(LinearWaypointProvider.class, "linear");
}
}