Merge remote-tracking branch 'refs/remotes/origin/develop' into update/hub-makeover

This commit is contained in:
Sam 2017-09-12 21:33:20 +01:00
commit b8210f5eac
3 changed files with 9 additions and 6 deletions

View File

@ -422,9 +422,9 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
{ {
if (transaction.Coins == 0 && transaction.Gems == 0) if (transaction.Coins == 0 && transaction.Gems == 0)
{ {
if (transaction.SalesPackageName.split(" ").length == 4) if (transaction.SalesPackageName.split(" ").length == 3)
hogChestReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]); hogChestReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
else if (transaction.SalesPackageName.split(" ").length == 3) else if (transaction.SalesPackageName.split(" ").length == 2)
hogChestReceived += 1; hogChestReceived += 1;
} }
} }

View File

@ -32,7 +32,7 @@ public class BuffRooting extends Buff<Player>
public void onApply() public void onApply()
{ {
UtilAction.zeroVelocity(_entity); UtilAction.zeroVelocity(_entity);
_entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 3)); _entity.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, (int) (_duration / 50D), 3));
UtilTextMiddle.display("", C.cRed + "Rooted", 10, 20, 10, (Player) _entity); UtilTextMiddle.display("", C.cRed + "Rooted", 10, 20, 10, (Player) _entity);
} }

View File

@ -211,14 +211,17 @@ public class MobaUtil
public static void setTeamEntity(LivingEntity entity, GameTeam team) public static void setTeamEntity(LivingEntity entity, GameTeam team)
{ {
UtilEnt.addFlag(entity, MobaConstants.TEAM_METADATA + team.GetName()); UtilEnt.SetMetadata(entity, MobaConstants.TEAM_METADATA, team.GetName());
} }
public static boolean isTeamEntity(LivingEntity entity, GameTeam team) public static boolean isTeamEntity(LivingEntity entity, GameTeam team)
{ {
return UtilEnt.hasFlag(entity, MobaConstants.TEAM_METADATA + team.GetName()); String metadata = UtilEnt.GetMetadata(entity, MobaConstants.TEAM_METADATA);
return metadata != null && metadata.equals(team.GetName());
} }
public static void heal(LivingEntity entity, Player source, double health) public static void heal(LivingEntity entity, Player source, double health)
{ {
if (entity instanceof Player) if (entity instanceof Player)