mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-30 03:47:39 +01:00
d6bdb0486a
- Formatting - Warning about old Bukkit version - Renamed "TOWNY_CANNOT_CREATE_SHOP_HERE" to "CANNOT_CREATE_SHOP_HERE" to avoid confusion - Renamed "NOT_ENOUGH_LWC_PROTECTIONS" to "NOT_ENOUGH_PROTECTIONS" and changed its message - Fixed armour enchantments - Logging shop location - Fixed Heroes for the newest version - Removed redutant plugin object - Added dev-url for CraftBukkitUpToDate - Removed redutant plugins from softdepend - Fixed a bug when the player interacts with a shop with a sign in hand
27 lines
868 B
Java
27 lines
868 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.getCharacterManager().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);
|
|
}
|
|
}
|
|
}
|
|
}
|