Fixed Object Cast in TntFill

This commit is contained in:
Driftay 2019-08-29 08:05:02 -04:00
parent b30711ebcf
commit c2ddcb34ce

View File

@ -137,17 +137,17 @@ public class CmdTntFill extends FCommand {
return;
}
if (fme.getFaction().getTnt() < amount) {
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
return;
}
int fullStacks = amount / 64;
int remainderAmt = amount % 64;
if ((remainderAmt == 0 && getEmptySlots(me) <= fullStacks)) {
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
return;
}
if (getEmptySlots(me) + 1 <= fullStacks) {
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
return;
}
ItemStack tnt64 = new ItemStack(Material.TNT, 64);
@ -192,7 +192,7 @@ public class CmdTntFill extends FCommand {
return false;
}
if (getEmptySlots(me) + 1 <= fullStacks) {
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
return false;
}
return true;