Fix PlayerBuffData entry removal. (toLowerCase() mismatch issue)

dev
sigonasr2 11 years ago
parent 4bc85772da
commit 8a362a0e6a
  1. 2
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -12303,7 +12303,7 @@ implements Listener
p.closeInventory(); p.closeInventory();
} }
for (int i=0;i<this.plugin.SPEED_CONTROL.size();i++) { for (int i=0;i<this.plugin.SPEED_CONTROL.size();i++) {
if (this.plugin.SPEED_CONTROL.get(i).p.getName().compareTo(p.getName().toLowerCase())==0) { if (this.plugin.SPEED_CONTROL.get(i).p.getName().toLowerCase().compareTo(p.getName().toLowerCase())==0) {
p.removePotionEffect(PotionEffectType.SPEED); p.removePotionEffect(PotionEffectType.SPEED);
//If they have a "speed" potion, give it back. //If they have a "speed" potion, give it back.
p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, (int) ((this.plugin.SPEED_CONTROL.get(i).potion_time-Main.SERVER_TICK_TIME)*2), this.plugin.SPEED_CONTROL.get(i).potion_spdlv, true)); p.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, (int) ((this.plugin.SPEED_CONTROL.get(i).potion_time-Main.SERVER_TICK_TIME)*2), this.plugin.SPEED_CONTROL.get(i).potion_spdlv, true));

Loading…
Cancel
Save