mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 08:06:54 +02:00
remove all L
This commit is contained in:
@@ -131,7 +131,7 @@ public class Commandexp extends EssentialsCommand
|
|||||||
strAmount = strAmount.toLowerCase(Locale.ENGLISH);
|
strAmount = strAmount.toLowerCase(Locale.ENGLISH);
|
||||||
if (strAmount.startsWith("l") || strAmount.endsWith("l"))
|
if (strAmount.startsWith("l") || strAmount.endsWith("l"))
|
||||||
{
|
{
|
||||||
strAmount = strAmount.substring(1);
|
strAmount = strAmount.replaceAll("l","");
|
||||||
int neededLevel = Integer.parseInt(strAmount);
|
int neededLevel = Integer.parseInt(strAmount);
|
||||||
if (give)
|
if (give)
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,11 @@ public class Commandexp extends EssentialsCommand
|
|||||||
SetExpFix.setTotalExperience(target, 0);
|
SetExpFix.setTotalExperience(target, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
amount = (long)Integer.parseInt(strAmount);
|
amount = Long.parseLong(strAmount);
|
||||||
|
if (amount < 0 || amount > Integer.MAX_VALUE)
|
||||||
|
{
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (give)
|
if (give)
|
||||||
@@ -152,10 +156,6 @@ public class Commandexp extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
amount = (long)Integer.MAX_VALUE;
|
amount = (long)Integer.MAX_VALUE;
|
||||||
}
|
}
|
||||||
if (amount < 0 || amount > Integer.MAX_VALUE)
|
|
||||||
{
|
|
||||||
throw new NotEnoughArgumentsException();
|
|
||||||
}
|
|
||||||
SetExpFix.setTotalExperience(target, amount.intValue());
|
SetExpFix.setTotalExperience(target, amount.intValue());
|
||||||
sender.sendMessage(_("expSet", target.getDisplayName(), amount));
|
sender.sendMessage(_("expSet", target.getDisplayName(), amount));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user