#769: Fix FishHook.maxWaitTime

This commit is contained in:
Airtheon 2020-11-09 18:21:10 +11:00 committed by md_5
parent bc6a175eff
commit 009f0ba0ef
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -50,8 +50,8 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
@Override
public void setMaxWaitTime(int maxWaitTime) {
EntityFishingHook hook = getHandle();
Validate.isTrue(maxWaitTime >= 0 && maxWaitTime >= this.getMinWaitTime(), "The maximum wait time should higher than 0 and the minimum wait time.");
hook.minWaitTime = maxWaitTime;
Validate.isTrue(maxWaitTime >= 0 && maxWaitTime >= this.getMinWaitTime(), "The maximum wait time should be higher than or equal to 0 and the minimum wait time.");
hook.maxWaitTime = maxWaitTime;
}
@Override