mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-15 23:26:16 +01:00
Check papi/plib enabled
This commit is contained in:
parent
eed9170519
commit
8ad3a14b7c
@ -432,10 +432,12 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
|
|||||||
selector = new NPCSelector(this);
|
selector = new NPCSelector(this);
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(new EventListen(storedRegistries), this);
|
Bukkit.getPluginManager().registerEvents(new EventListen(storedRegistries), this);
|
||||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
Plugin papi = Bukkit.getPluginManager().getPlugin("PlaceholderAPI");
|
||||||
|
if (papi != null && papi.isEnabled()) {
|
||||||
new CitizensPlaceholders(selector).register();
|
new CitizensPlaceholders(selector).register();
|
||||||
}
|
}
|
||||||
if (Bukkit.getPluginManager().getPlugin("ProtocolLib") != null) {
|
Plugin plib = Bukkit.getPluginManager().getPlugin("ProtocolLib");
|
||||||
|
if (plib != null && plib.isEnabled()) {
|
||||||
protocolListener = new ProtocolLibListener(this);
|
protocolListener = new ProtocolLibListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user