diff --git a/src/main/java/com/minecolonies/core/colony/requestsystem/resolvers/core/AbstractWarehouseRequestResolver.java b/src/main/java/com/minecolonies/core/colony/requestsystem/resolvers/core/AbstractWarehouseRequestResolver.java index 5974c74cf6b..1d2818a5186 100755 --- a/src/main/java/com/minecolonies/core/colony/requestsystem/resolvers/core/AbstractWarehouseRequestResolver.java +++ b/src/main/java/com/minecolonies/core/colony/requestsystem/resolvers/core/AbstractWarehouseRequestResolver.java @@ -90,7 +90,7 @@ public boolean canResolveRequest(@NotNull final IRequestManager manager, final I } } - if (!isRequestChainValid(manager, requestToCheck, requestToCheck)) + if (!isRequestChainValid(manager, requestToCheck)) { return false; } @@ -130,18 +130,13 @@ public boolean canResolveRequest(@NotNull final IRequestManager manager, final I * @param requestToCheck * @return */ - public boolean isRequestChainValid(@NotNull final IRequestManager manager, final IRequest requestToCheck, final IRequest initialRequest) + public boolean isRequestChainValid(@NotNull final IRequestManager manager, final IRequest requestToCheck) { if (!requestToCheck.hasParent()) { return true; } - if (requestToCheck.equals(initialRequest)) - { - return false; - } - final IRequest parentRequest = manager.getRequestForToken(requestToCheck.getParent()); //Should not happen but just to be sure. @@ -150,7 +145,7 @@ public boolean isRequestChainValid(@NotNull final IRequestManager manager, final return true; } - return isRequestChainValid(manager, parentRequest, initialRequest); + return isRequestChainValid(manager, parentRequest); } @Nullable