Split Support Item / Missile Item #19
@ -58,15 +58,12 @@ public abstract class SpecialItem {
|
||||
}
|
||||
|
||||
public static boolean handleUse(ItemStack item, Player player) {
|
||||
for (SpecialItem missileItem : missileItems) {
|
||||
if (item.isSimilar(missileItem.getItem())) {
|
||||
return missileItem.handleUse(player);
|
||||
}
|
||||
}
|
||||
for (SpecialItem specialItem : supportItems) {
|
||||
if (item.isSimilar(specialItem.getItem())) {
|
||||
return specialItem.handleUse(player);
|
||||
}
|
||||
return handleUse(item, player, missileItems) || handleUse(item, player, supportItems);
|
||||
}
|
||||
|
||||
private static boolean handleUse(ItemStack item, Player player, List<SpecialItem> items) {
|
||||
for (SpecialItem specialItem : items) {
|
||||
if (item.isSimilar(specialItem.getItem())) return specialItem.handleUse(player);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren