Removed stream usage from ArmorSet.
This commit is contained in:
parent
191437e653
commit
420b8409e5
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -246,7 +246,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -246,7 +246,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -246,7 +246,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -246,7 +246,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,7 +159,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Player player, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return player.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : player.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +243,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Playable playable, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : playable.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +243,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Playable playable, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : playable.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +243,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Playable playable, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : playable.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -243,7 +243,14 @@ public class ArmorSet
|
||||
|
||||
public boolean hasOptionalEquipped(Playable playable, Function<Item, Integer> idProvider)
|
||||
{
|
||||
return playable.getInventory().getPaperdollItems().stream().anyMatch(item -> CommonUtil.contains(_optionalItems, idProvider.apply(item)));
|
||||
for (Item item : playable.getInventory().getPaperdollItems())
|
||||
{
|
||||
if (CommonUtil.contains(_optionalItems, idProvider.apply(item)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user