Permalink
Browse files

Bug fixes, Fixed petrify spamming console, hp wouldn't level up.

  • Loading branch information...
BuildTools
BuildTools committed Mar 9, 2017
1 parent d13c516 commit 503ecbe39005eecd95e8c08774e5113b7ddecc08
Showing with 7 additions and 7 deletions.
  1. +1 −4 src/xyz/almia/accountsystem/Character.java
  2. +6 −3 src/xyz/almia/damagesystem/Damage.java
@@ -447,7 +447,7 @@ public void applyShowStats(){
int intel = getShowStat(Stat.INTELLIGENCE);
int agi = getShowStat(Stat.AGILITY);
int str = getShowStat(Stat.STRENGTH);
int hp = getShowStat(Stat.INTELLIGENCE);
int hp = getShowStat(Stat.HITPOINTS);
setStat(Stat.INTELLIGENCE, getStat(Stat.INTELLIGENCE)+ intel);
setStat(Stat.AGILITY, getStat(Stat.AGILITY)+ agi);
setStat(Stat.STRENGTH, getStat(Stat.STRENGTH)+ str);
@@ -465,12 +465,10 @@ public void setShowStat(Stat stat, int value){
return;
}
public int getShowStat(Stat stat){
return config.getInt("stats.show."+stat.toString().toLowerCase());
}
public void subtractShowStat(Stat stat){
if(getShowStat(stat) > 0){
setShowStat(stat, getShowStat(stat)-1);
@@ -479,7 +477,6 @@ public void subtractShowStat(Stat stat){
return;
}
public void addShowStat(Stat stat){
int total = getShowStat(Stat.AGILITY) + getShowStat(Stat.HITPOINTS) + getShowStat(Stat.INTELLIGENCE) + getShowStat(Stat.STRENGTH);
if(total < getAbilityPoints()){
@@ -23,6 +23,7 @@
import org.bukkit.potion.PotionEffectType;
import org.bukkit.scheduler.BukkitRunnable;
import xyz.almia.accountsystem.Account;
import xyz.almia.accountsystem.AccountStatus;
import xyz.almia.cardinalsystem.Cardinal;
import xyz.almia.enchantsystem.Enchantments;
import xyz.almia.itemblueprints.Armor;
@@ -419,9 +420,11 @@ public void onPlayerKillCreature(EntityDeathEvent event){
@EventHandler
public void onMove(PlayerMoveEvent event){
if(petrified.contains(new Account(event.getPlayer()).getLoadedCharacter().getUsername())){
event.setCancelled(true);
event.getPlayer().sendMessage(ChatColor.YELLOW+"You are petrified!");
if(new Account(event.getPlayer()).getStatus().equals(AccountStatus.LOGGEDIN)){
if(petrified.contains(new Account(event.getPlayer()).getLoadedCharacter().getUsername())){
event.setCancelled(true);
event.getPlayer().sendMessage(ChatColor.YELLOW+"You are petrified!");
}
}
}

0 comments on commit 503ecbe

Please sign in to comment.