Fix build

This commit is contained in:
fullwall 2014-05-09 19:24:39 +08:00
parent 3f22729ca9
commit 7a12d26a8e
2 changed files with 9 additions and 7 deletions

View File

@ -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(

View File

@ -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;
@ -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);
}