mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-29 03:21:36 +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);
|
return commands.getCommands(base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public net.citizensnpcs.api.npc.NPCSelector getDefaultNPCSelector() {
|
||||||
|
return selector;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NPCRegistry getNamedNPCRegistry(String name) {
|
public NPCRegistry getNamedNPCRegistry(String name) {
|
||||||
return storedRegistries.get(name);
|
return storedRegistries.get(name);
|
||||||
|
@ -29,7 +29,7 @@ import org.bukkit.plugin.Plugin;
|
|||||||
|
|
||||||
import com.google.common.collect.Lists;
|
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 int consoleSelectedNPC = -1;
|
||||||
private final Plugin plugin;
|
private final Plugin plugin;
|
||||||
|
|
||||||
@ -38,6 +38,7 @@ public class NPCSelector implements Listener {
|
|||||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public NPC getSelected(CommandSender sender) {
|
public NPC getSelected(CommandSender sender) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
return getSelectedFromMetadatable((Player) sender);
|
return getSelectedFromMetadatable((Player) sender);
|
||||||
|
Loading…
Reference in New Issue
Block a user