/**
  * Initializes the listener. This is automatically handled by SkillAPI and shouldn't be
  * instantiated by other plugins.
  *
  * @param api SkillAPI reference
  */
 public AttributeListener(SkillAPI api) {
   api.getServer().getPluginManager().registerEvents(this, api);
 }
Exemple #2
0
 /** Checks all players for mana regeneration each interval */
 public void run() {
   for (Player player : plugin.getServer().getOnlinePlayers()) {
     PlayerData data = SkillAPI.getPlayerData(player);
     data.regenMana();
   }
 }