Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fixed error with junit #134

Merged
merged 4 commits into from
Jan 19, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
downgraded to spigot 1.9.4
RoinujNosde committed Jan 19, 2025
commit 1ec22a9d8c1e6334f2f7154dc273de0f422954f3
36 changes: 5 additions & 31 deletions src/test/java/me/roinujnosde/titansbattle/FakeBukkitScheduler.java
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
import java.util.concurrent.Callable;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
import java.util.function.Consumer;

public class FakeBukkitScheduler implements BukkitScheduler {

@@ -103,6 +102,11 @@ public void cancelTasks(@NotNull Plugin plugin) {
throw new UnsupportedOperationException();
}

@Override
public void cancelAllTasks() {
throw new UnsupportedOperationException();
}

@Override
public boolean isCurrentlyRunning(int i) {
throw new UnsupportedOperationException();
@@ -131,11 +135,6 @@ public boolean isQueued(int i) {
return task;
}

@Override
public void runTask(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTask(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable) throws IllegalArgumentException {
throw new UnsupportedOperationException();
@@ -146,11 +145,6 @@ public void runTask(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask
throw new UnsupportedOperationException();
}

@Override
public void runTaskAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTaskAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable) throws IllegalArgumentException {
throw new UnsupportedOperationException();
@@ -164,11 +158,6 @@ public void runTaskAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? su
return task;
}

@Override
public void runTaskLater(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer, long l) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTaskLater(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable, long l) throws IllegalArgumentException {
throw new UnsupportedOperationException();
@@ -179,11 +168,6 @@ public void runTaskLater(@NotNull Plugin plugin, @NotNull Consumer<? super Bukki
throw new UnsupportedOperationException();
}

@Override
public void runTaskLaterAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer, long l) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTaskLaterAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable, long l) throws IllegalArgumentException {
throw new UnsupportedOperationException();
@@ -197,11 +181,6 @@ public void runTaskLaterAsynchronously(@NotNull Plugin plugin, @NotNull Consumer
return task;
}

@Override
public void runTaskTimer(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer, long l, long l1) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTaskTimer(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable, long l, long l1) throws IllegalArgumentException {
throw new UnsupportedOperationException();
@@ -212,11 +191,6 @@ public void runTaskTimer(@NotNull Plugin plugin, @NotNull Consumer<? super Bukki
throw new UnsupportedOperationException();
}

@Override
public void runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull Consumer<? super BukkitTask> consumer, long l, long l1) throws IllegalArgumentException {
throw new UnsupportedOperationException();
}

@Override
public @NotNull BukkitTask runTaskTimerAsynchronously(@NotNull Plugin plugin, @NotNull BukkitRunnable bukkitRunnable, long l, long l1) throws IllegalArgumentException {
throw new UnsupportedOperationException();
5 changes: 2 additions & 3 deletions src/test/java/me/roinujnosde/titansbattle/FakeBukkitTask.java
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ public class FakeBukkitTask implements BukkitTask {
private final Runnable runnable;
private final boolean sync;
private boolean cancelled;
private boolean repeating;
private final boolean repeating;
private long scheduledTick;
private long period;
private final long period;

public FakeBukkitTask(int taskId, Plugin plugin, Runnable runnable, boolean sync, boolean repeating, long scheduledTick, long period) {
this.taskId = taskId;
@@ -44,7 +44,6 @@ public boolean isSync() {
return sync;
}

@Override
public boolean isCancelled() {
return cancelled;
}