Fixed Object Cast in TntFill
This commit is contained in:
parent
b30711ebcf
commit
c2ddcb34ce
@ -137,17 +137,17 @@ public class CmdTntFill extends FCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fme.getFaction().getTnt() < amount) {
|
if (fme.getFaction().getTnt() < amount) {
|
||||||
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
|
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int fullStacks = amount / 64;
|
int fullStacks = amount / 64;
|
||||||
int remainderAmt = amount % 64;
|
int remainderAmt = amount % 64;
|
||||||
if ((remainderAmt == 0 && getEmptySlots(me) <= fullStacks)) {
|
if ((remainderAmt == 0 && getEmptySlots(me) <= fullStacks)) {
|
||||||
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
|
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (getEmptySlots(me) + 1 <= fullStacks) {
|
if (getEmptySlots(me) + 1 <= fullStacks) {
|
||||||
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
|
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack tnt64 = new ItemStack(Material.TNT, 64);
|
ItemStack tnt64 = new ItemStack(Material.TNT, 64);
|
||||||
@ -192,7 +192,7 @@ public class CmdTntFill extends FCommand {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (getEmptySlots(me) + 1 <= fullStacks) {
|
if (getEmptySlots(me) + 1 <= fullStacks) {
|
||||||
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH.toString());
|
fme.msg(TL.COMMAND_TNT_WIDTHDRAW_NOTENOUGH);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user