ChestShop-3/com/Acrobot/ChestShop/Utils/uHeroes.java
Acrobot e87f5f4f11 - Added a warning if spawn-radius isn't set to 0
- Deleted a few outdated plugins from built-in Register
- System.out -> System.err for errors
- Blocked buying if you're holding a sign in your hand (allows, for example, for sign editors to work)
- Updated Heroes package
- Fixed WG integration (no longer throws errors, but uses ugly workaround)
- Fixed a small bug in Register plugin loading message
- Removed version checking for OddItem, WorldGuard and LWC
2012-03-06 19:41:14 +01:00

27 lines
863 B
Java

package com.Acrobot.ChestShop.Utils;
import com.Acrobot.ChestShop.Config.Config;
import com.Acrobot.ChestShop.Config.Property;
import com.herocraftonline.heroes.Heroes;
import com.herocraftonline.heroes.characters.Hero;
import com.herocraftonline.heroes.characters.classes.HeroClass;
import org.bukkit.entity.Player;
/**
* @author Acrobot
*/
public class uHeroes {
public static Heroes heroes;
public static void addHeroExp(Player p) {
if (heroes != null) {
Hero hero = heroes.getHeroManager().getHero(p);
if (hero.hasParty()) {
hero.getParty().gainExp(Config.getDouble(Property.HEROES_EXP), HeroClass.ExperienceType.EXTERNAL, p.getLocation());
} else {
hero.gainExp(Config.getDouble(Property.HEROES_EXP), HeroClass.ExperienceType.EXTERNAL);
}
}
}
}