NPCSelector impl

This commit is contained in:
fullwall 2013-02-20 21:58:57 +08:00
parent 7291f873d2
commit 7e20713f7c
2 changed files with 7 additions and 1 deletions

View File

@ -160,6 +160,11 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return commands.getCommands(base);
}
@Override
public net.citizensnpcs.api.npc.NPCSelector getDefaultNPCSelector() {
return selector;
}
@Override
public NPCRegistry getNamedNPCRegistry(String name) {
return storedRegistries.get(name);

View File

@ -29,7 +29,7 @@ import org.bukkit.plugin.Plugin;
import com.google.common.collect.Lists;
public class NPCSelector implements Listener {
public class NPCSelector implements Listener, net.citizensnpcs.api.npc.NPCSelector {
private int consoleSelectedNPC = -1;
private final Plugin plugin;
@ -38,6 +38,7 @@ public class NPCSelector implements Listener {
Bukkit.getPluginManager().registerEvents(this, plugin);
}
@Override
public NPC getSelected(CommandSender sender) {
if (sender instanceof Player) {
return getSelectedFromMetadatable((Player) sender);