Removed stream usage from PlayerInventory.
This commit is contained in:
parent
1d450d87d8
commit
6fd1fe7363
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user