From 0b89738ec0036548c5b30b05f6d6f1b8aaa0bf31 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Sat, 16 Nov 2024 17:03:11 +0800 Subject: [PATCH] Update to mockbukkit 4.0 --- build.gradle | 2 +- .../org/mvplugins/multiverse/core/TestWithMockBukkit.kt | 2 +- .../multiverse/core/commands/VersionCommandTest.kt | 2 +- .../org/mvplugins/multiverse/core/mock/MVServerMock.java | 8 ++++---- .../org/mvplugins/multiverse/core/mock/MVWorldMock.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 05403606..aa4b5740 100644 --- a/build.gradle +++ b/build.gradle @@ -136,7 +136,7 @@ dependencies { // Tests testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21' - testImplementation 'com.github.seeseemelk:MockBukkit-v1.21:3.133.2' + testImplementation 'org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.3.1' testImplementation('com.googlecode.json-simple:json-simple:1.1.1') { exclude group: 'junit', module: 'junit' } diff --git a/src/test/java/org/mvplugins/multiverse/core/TestWithMockBukkit.kt b/src/test/java/org/mvplugins/multiverse/core/TestWithMockBukkit.kt index f77f4d52..975d7680 100644 --- a/src/test/java/org/mvplugins/multiverse/core/TestWithMockBukkit.kt +++ b/src/test/java/org/mvplugins/multiverse/core/TestWithMockBukkit.kt @@ -1,7 +1,7 @@ package org.mvplugins.multiverse.core -import be.seeseemelk.mockbukkit.MockBukkit import com.dumptruckman.minecraft.util.Logging +import org.mockbukkit.mockbukkit.MockBukkit import org.mvplugins.multiverse.core.inject.PluginServiceLocator import org.mvplugins.multiverse.core.mock.MVServerMock import org.mvplugins.multiverse.core.utils.TestingMode diff --git a/src/test/java/org/mvplugins/multiverse/core/commands/VersionCommandTest.kt b/src/test/java/org/mvplugins/multiverse/core/commands/VersionCommandTest.kt index 1a0fd939..e642e883 100644 --- a/src/test/java/org/mvplugins/multiverse/core/commands/VersionCommandTest.kt +++ b/src/test/java/org/mvplugins/multiverse/core/commands/VersionCommandTest.kt @@ -1,8 +1,8 @@ package org.mvplugins.multiverse.core.commands -import be.seeseemelk.mockbukkit.entity.PlayerMock import org.bukkit.Bukkit import org.bukkit.ChatColor +import org.mockbukkit.mockbukkit.entity.PlayerMock import org.mvplugins.multiverse.core.TestWithMockBukkit import kotlin.test.BeforeTest import kotlin.test.Test diff --git a/src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java b/src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java index ff802cc5..1ed0cb32 100644 --- a/src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java +++ b/src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java @@ -1,11 +1,11 @@ package org.mvplugins.multiverse.core.mock; -import be.seeseemelk.mockbukkit.ServerMock; -import be.seeseemelk.mockbukkit.WorldMock; -import be.seeseemelk.mockbukkit.command.MockCommandMap; import org.bukkit.World; import org.bukkit.WorldCreator; import org.jetbrains.annotations.NotNull; +import org.mockbukkit.mockbukkit.ServerMock; +import org.mockbukkit.mockbukkit.command.CommandMapMock; +import org.mockbukkit.mockbukkit.world.WorldMock; import java.io.File; import java.io.IOException; @@ -24,7 +24,7 @@ public class MVServerMock extends ServerMock { // This is required for acf reflection to work @Override - public @NotNull MockCommandMap getCommandMap() { + public @NotNull CommandMapMock getCommandMap() { return super.getCommandMap(); } diff --git a/src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java b/src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java index ecff0590..2d2adfa1 100644 --- a/src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java +++ b/src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java @@ -1,9 +1,9 @@ package org.mvplugins.multiverse.core.mock; -import be.seeseemelk.mockbukkit.MockBukkit; -import be.seeseemelk.mockbukkit.WorldMock; import org.bukkit.WorldCreator; import org.jetbrains.annotations.NotNull; +import org.mockbukkit.mockbukkit.MockBukkit; +import org.mockbukkit.mockbukkit.world.WorldMock; import java.io.File;