mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-14 13:13:24 +00:00
Fix erroneous usage of setAmount(0) on mirrored ItemStacks
This commit is contained in:
parent
abfec5a60f
commit
705c1c60c8
1 changed files with 4 additions and 4 deletions
|
@ -167,22 +167,22 @@ public class ItemDb implements IConf, net.ess3.api.IItemDb {
|
||||||
List<ItemStack> is = new ArrayList<>();
|
List<ItemStack> is = new ArrayList<>();
|
||||||
|
|
||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
is.add(user.getItemInHand());
|
is.add(user.getItemInHand().clone());
|
||||||
} else if (args[0].equalsIgnoreCase("hand")) {
|
} else if (args[0].equalsIgnoreCase("hand")) {
|
||||||
is.add(user.getItemInHand());
|
is.add(user.getItemInHand().clone());
|
||||||
} else if (args[0].equalsIgnoreCase("inventory") || args[0].equalsIgnoreCase("invent") || args[0].equalsIgnoreCase("all")) {
|
} else if (args[0].equalsIgnoreCase("inventory") || args[0].equalsIgnoreCase("invent") || args[0].equalsIgnoreCase("all")) {
|
||||||
for (ItemStack stack : user.getBase().getInventory().getContents()) {
|
for (ItemStack stack : user.getBase().getInventory().getContents()) {
|
||||||
if (stack == null || stack.getType() == Material.AIR) {
|
if (stack == null || stack.getType() == Material.AIR) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
is.add(stack);
|
is.add(stack.clone());
|
||||||
}
|
}
|
||||||
} else if (args[0].equalsIgnoreCase("blocks")) {
|
} else if (args[0].equalsIgnoreCase("blocks")) {
|
||||||
for (ItemStack stack : user.getBase().getInventory().getContents()) {
|
for (ItemStack stack : user.getBase().getInventory().getContents()) {
|
||||||
if (stack == null || stack.getTypeId() > 255 || stack.getType() == Material.AIR) {
|
if (stack == null || stack.getTypeId() > 255 || stack.getType() == Material.AIR) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
is.add(stack);
|
is.add(stack.clone());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
is.add(get(args[0]));
|
is.add(get(args[0]));
|
||||||
|
|
Loading…
Reference in a new issue