예제 #1
0
 /**
  * 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);
 }
예제 #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();
   }
 }