mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-11 02:47:52 +01:00
Fix getItemInMainHand behavior breaking /worth (#1053)
This commit is contained in:
parent
198d852995
commit
ca28d8aa84
@ -7,6 +7,7 @@ import org.bukkit.Server;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
@ -23,7 +24,12 @@ public class Commandworth extends EssentialsCommand {
|
||||
BigDecimal totalWorth = BigDecimal.ZERO;
|
||||
String type = "";
|
||||
|
||||
List<ItemStack> is = ess.getItemDb().getMatching(user, args);
|
||||
List<ItemStack> tmp = ess.getItemDb().getMatching(user, args);
|
||||
List<ItemStack> is = new ArrayList<>(tmp.size());
|
||||
for (ItemStack stack : tmp) {
|
||||
is.add(stack.clone());
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
boolean isBulk = is.size() > 1;
|
||||
|
Loading…
Reference in New Issue
Block a user