mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-28 13:05:11 +01:00
c3b084fd1a
- Added shop refund message - Recoded Register for ChestShop - Added VAULT support (Register is used when no Vault is found) - Added Heroes exp option for granting exp for shop creation - EXPERIMENTAL: Option to cause BlockState.update() every transaction (probably doesn't work, as Block.applyPhysics() is needed) - Added ChestShop.nofee permission for free shop creation (and no refunds) - Added a separate Admin Shop tax option -
27 lines
874 B
Java
27 lines
874 B
Java
package com.Acrobot.ChestShop.Utils;
|
|
|
|
import com.Acrobot.ChestShop.Config.Config;
|
|
import com.Acrobot.ChestShop.Config.Property;
|
|
import com.herocraftonline.dev.heroes.Heroes;
|
|
import com.herocraftonline.dev.heroes.classes.HeroClass;
|
|
import com.herocraftonline.dev.heroes.hero.Hero;
|
|
import org.bukkit.entity.Player;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class uHeroes {
|
|
public static Heroes heroes;
|
|
|
|
public static void addHeroExp(Player p) {
|
|
if (uHeroes.heroes != null) {
|
|
Hero hero = uHeroes.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);
|
|
}
|
|
}
|
|
}
|
|
}
|