Esempio n. 1
0
  private void checkPluginVault() {
    if (vault != null) return;

    Plugin vaultCheck = pm.getPlugin("Vault");
    if (vaultCheck != null && vaultCheck.isEnabled()) {
      vault = vaultCheck;
      core.log.info(core.getNameBrackets() + "found Vault plugin.");

      RegisteredServiceProvider<Permission> permissionProvider =
          core.getServer()
              .getServicesManager()
              .getRegistration(net.milkbowl.vault.permission.Permission.class);
      if (permissionProvider != null) {
        permission = permissionProvider.getProvider();
        core.log.info(
            core.getNameBrackets() + "Reported permission provider: " + permission.getName());
      }

      RegisteredServiceProvider<Economy> economyProvider =
          core.getServer()
              .getServicesManager()
              .getRegistration(net.milkbowl.vault.economy.Economy.class);
      if (economyProvider != null) {
        economy = economyProvider.getProvider();
        core.log.info(core.getNameBrackets() + "Reported economy provider: " + economy.getName());
      }
    }
  }
Esempio n. 2
0
 public void checkDisabledPlugin(Plugin plugin) {
   if (plugin.getDescription().getName().equals("Vault")) {
     permission = null;
     economy = null;
     vault = null;
     core.log.info(core.getNameBrackets() + "lost Vault plugin");
   }
 }
 public void onCreatureSpawn(CreatureSpawnEvent event) {
   if (plugin.getWorlds().get(event.getLocation().getWorld()) != null)
     plugin.getWorlds().get(event.getLocation().getWorld()).checkCreatureLimit();
 }
Esempio n. 4
0
 public PluginManager(XcraftGate core) {
   this.core = core;
   this.pm = core.getServer().getPluginManager();
 }