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