mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-13 11:41:26 +01:00
Fix build
This commit is contained in:
parent
3f22729ca9
commit
7a12d26a8e
@ -10,8 +10,8 @@ import net.citizensnpcs.editor.EquipmentEditor;
|
||||
import net.citizensnpcs.trait.text.Text;
|
||||
import net.citizensnpcs.trait.waypoint.Waypoints;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@Requirements(selected = true, ownership = true)
|
||||
public class EditorCommands {
|
||||
@ -50,7 +50,10 @@ public class EditorCommands {
|
||||
permission = "citizens.npc.edit.path")
|
||||
@Requirements(selected = true, ownership = true)
|
||||
public void path(CommandContext args, CommandSender player, NPC npc) {
|
||||
Editor.enterOrLeave(player, npc.getTrait(Waypoints.class).getEditor(player, args));
|
||||
Editor editor = npc.getTrait(Waypoints.class).getEditor(player, args);
|
||||
if (editor == null)
|
||||
return;
|
||||
Editor.enterOrLeave((Player) player, editor);
|
||||
}
|
||||
|
||||
@Command(
|
||||
|
@ -14,7 +14,6 @@ import net.citizensnpcs.util.Messages;
|
||||
import net.citizensnpcs.util.StringHelper;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
@ -45,7 +44,7 @@ public class Waypoints extends Trait {
|
||||
/**
|
||||
* Returns the current {@link WaypointProvider}. May be null during
|
||||
* initialisation.
|
||||
*
|
||||
*
|
||||
* @return The current provider
|
||||
*/
|
||||
public WaypointProvider getCurrentProvider() {
|
||||
@ -59,7 +58,7 @@ public class Waypoints extends Trait {
|
||||
return providerName;
|
||||
}
|
||||
|
||||
public Editor getEditor(Player player, CommandContext args) {
|
||||
public Editor getEditor(CommandSender player, CommandContext args) {
|
||||
return provider.createEditor(player, args);
|
||||
}
|
||||
|
||||
@ -95,7 +94,7 @@ public class Waypoints extends Trait {
|
||||
|
||||
/**
|
||||
* Sets the current {@link WaypointProvider} using the given name.
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* The name of the waypoint provider, registered using
|
||||
* {@link #registerWaypointProvider(Class, String)}
|
||||
@ -119,7 +118,7 @@ public class Waypoints extends Trait {
|
||||
/**
|
||||
* Registers a {@link WaypointProvider}, which can be subsequently used by
|
||||
* NPCs.
|
||||
*
|
||||
*
|
||||
* @param clazz
|
||||
* The class of the waypoint provider
|
||||
* @param name
|
||||
|
Loading…
Reference in New Issue
Block a user