test-fix-items #218
@ -22,12 +22,15 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_10_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
class PersonalKitCreator_10 {
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().c();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().c());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,15 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_12_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
class PersonalKitCreator_12 {
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().c();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().c());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
@ -22,6 +22,7 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
@ -33,7 +34,9 @@ class PersonalKitCreator_14 {
|
||||
}
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().getKeys();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().getKeys());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,15 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
class PersonalKitCreator_15 {
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().getKeys();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().getKeys());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,15 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
class PersonalKitCreator_8 {
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().c();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().c());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,15 @@ package de.steamwar.fightsystem.listener;
|
||||
import org.bukkit.craftbukkit.v1_9_R2.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
class PersonalKitCreator_9 {
|
||||
|
||||
static boolean hasItems(ItemStack stack){
|
||||
Set<String> keys = CraftItemStack.asNMSCopy(stack).getTag().c();
|
||||
return keys.size() > 1 || !keys.contains("Enchantments");
|
||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).getTag().c());
|
||||
keys.remove("Enchantments");
|
||||
keys.remove("Damage");
|
||||
return !keys.isEmpty();
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren