Use PluginManager to look for PlayerPoints
This commit is contained in:
parent
079550c5f7
commit
2e6f5d9865
|
@ -424,13 +424,17 @@ public class BoosCoolDown extends JavaPlugin implements Runnable {
|
|||
}
|
||||
|
||||
private boolean hookPlayerPoints() {
|
||||
RegisteredServiceProvider<PlayerPoints> playerPointsProvider = getServer()
|
||||
.getServicesManager()
|
||||
.getRegistration(org.black_ixx.playerpoints.PlayerPoints.class);
|
||||
if (playerPointsProvider != null) {
|
||||
playerPoints = playerPointsProvider.getProvider();
|
||||
log.info("[" + pdfFile.getName() + "]" + " found [PlayerPoints], enabling support.");
|
||||
Plugin x = pm.getPlugin("PlayerPoints");
|
||||
if (x != null & x instanceof PlayerPoints) {
|
||||
RegisteredServiceProvider<PlayerPoints> playerPointsProvider = getServer()
|
||||
.getServicesManager()
|
||||
.getRegistration(org.black_ixx.playerpoints.PlayerPoints.class);
|
||||
if (playerPointsProvider != null) {
|
||||
playerPoints = playerPointsProvider.getProvider();
|
||||
log.info("[" + pdfFile.getName() + "]" + " found [PlayerPoints], enabling support.");
|
||||
}
|
||||
return playerPoints != null;
|
||||
}
|
||||
return playerPoints != null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue