Removed stream usage from PlayerInventory.
This commit is contained in:
@@ -989,11 +989,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -989,11 +989,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -989,11 +989,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -989,11 +989,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -993,11 +993,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -993,11 +993,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -993,11 +993,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -993,11 +993,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -994,11 +994,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -994,11 +994,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1065,11 +1065,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1065,11 +1065,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1065,11 +1065,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1065,11 +1065,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,11 +1069,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,11 +1069,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,11 +1069,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,11 +1069,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1069,11 +1069,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -989,11 +989,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1021,11 +1021,25 @@ public class PlayerInventory extends Inventory
|
|||||||
}
|
}
|
||||||
case WHITELIST:
|
case WHITELIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().anyMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
case BLACKLIST:
|
case BLACKLIST:
|
||||||
{
|
{
|
||||||
return blockedItems.stream().noneMatch(id -> id == itemId);
|
for (int id : blockedItems)
|
||||||
|
{
|
||||||
|
if (id == itemId)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user