mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-16 05:01:37 +01:00
NPCSelector impl
This commit is contained in:
parent
7291f873d2
commit
7e20713f7c
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user