This commit is contained in:
xGinko 2023-09-30 12:22:54 +02:00
parent 3109adb472
commit 100066bd85

View File

@ -17,17 +17,17 @@ public class VillagerOptimizeEvent extends Event implements Cancellable {
public VillagerOptimizeEvent(@NotNull WrappedVillager wrappedVillager, @NotNull OptimizationType type, boolean isAsync) throws IllegalArgumentException { public VillagerOptimizeEvent(@NotNull WrappedVillager wrappedVillager, @NotNull OptimizationType type, boolean isAsync) throws IllegalArgumentException {
super(isAsync); super(isAsync);
this.wrappedVillager = wrappedVillager; this.wrappedVillager = wrappedVillager;
this.type = type;
if (type.equals(OptimizationType.NONE)) { if (type.equals(OptimizationType.NONE)) {
throw new IllegalArgumentException("Type can't be NONE."); throw new IllegalArgumentException("OptimizationType can't be NONE.");
} else {
this.type = type;
} }
} }
public VillagerOptimizeEvent(@NotNull WrappedVillager wrappedVillager, @NotNull OptimizationType type) throws IllegalArgumentException { public VillagerOptimizeEvent(@NotNull WrappedVillager wrappedVillager, @NotNull OptimizationType type) throws IllegalArgumentException {
this.wrappedVillager = wrappedVillager; this.wrappedVillager = wrappedVillager;
if (type.equals(OptimizationType.NONE)) { if (type.equals(OptimizationType.NONE)) {
throw new IllegalArgumentException("Type can't be NONE."); throw new IllegalArgumentException("OptimizationType can't be NONE.");
} else { } else {
this.type = type; this.type = type;
} }
@ -43,7 +43,7 @@ public class VillagerOptimizeEvent extends Event implements Cancellable {
public void setOptimizationType(@NotNull OptimizationType type) throws IllegalArgumentException { public void setOptimizationType(@NotNull OptimizationType type) throws IllegalArgumentException {
if (type.equals(OptimizationType.NONE)) { if (type.equals(OptimizationType.NONE)) {
throw new IllegalArgumentException("Type can't be NONE."); throw new IllegalArgumentException("OptimizationType can't be NONE.");
} else { } else {
this.type = type; this.type = type;
} }