1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-08 15:46:54 +02:00

remove all L

This commit is contained in:
Alexander Schepp
2012-10-31 21:30:57 +01:00
parent f257a13e91
commit 61d5c898a4

View File

@@ -131,7 +131,7 @@ public class Commandexp extends EssentialsCommand
strAmount = strAmount.toLowerCase(Locale.ENGLISH);
if (strAmount.startsWith("l") || strAmount.endsWith("l"))
{
strAmount = strAmount.substring(1);
strAmount = strAmount.replaceAll("l","");
int neededLevel = Integer.parseInt(strAmount);
if (give)
{
@@ -141,7 +141,11 @@ public class Commandexp extends EssentialsCommand
SetExpFix.setTotalExperience(target, 0);
}
else {
amount = (long)Integer.parseInt(strAmount);
amount = Long.parseLong(strAmount);
if (amount < 0 || amount > Integer.MAX_VALUE)
{
throw new NotEnoughArgumentsException();
}
}
if (give)
@@ -152,10 +156,6 @@ public class Commandexp extends EssentialsCommand
{
amount = (long)Integer.MAX_VALUE;
}
if (amount < 0 || amount > Integer.MAX_VALUE)
{
throw new NotEnoughArgumentsException();
}
SetExpFix.setTotalExperience(target, amount.intValue());
sender.sendMessage(_("expSet", target.getDisplayName(), amount));
}