Skip to content

Commit

Permalink
Update to mockbukkit 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Nov 16, 2024
1 parent 20af035 commit 0b89738
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.mvplugins.multiverse.core.mock;

Check warning on line 1 in src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Missing package-info.java file. Raw Output: /github/workspace/./src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java:1:0: warning: Missing package-info.java file. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck)

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;

Check warning on line 10 in src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Wrong order for 'java.io.File' import. Raw Output: /github/workspace/./src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java:10:1: warning: Wrong order for 'java.io.File' import. (com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck)
import java.io.IOException;
Expand All @@ -24,7 +24,7 @@ public MVServerMock() throws IOException {

// This is required for acf reflection to work
@Override

Check warning on line 26 in src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Class 'MVServerMock' looks like designed for extension (can be subclassed), but the method 'getCommandMap' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'MVServerMock' final or making the method 'getCommandMap' static/final/abstract/empty, or adding allowed annotation for the method. Raw Output: /github/workspace/./src/test/java/org/mvplugins/multiverse/core/mock/MVServerMock.java:26:5: info: Class 'MVServerMock' looks like designed for extension (can be subclassed), but the method 'getCommandMap' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'MVServerMock' final or making the method 'getCommandMap' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)
public @NotNull MockCommandMap getCommandMap() {
public @NotNull CommandMapMock getCommandMap() {
return super.getCommandMap();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Check warning on line 8 in src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java

View workflow job for this annotation

GitHub Actions / checkstyle / checkstyle

[checkstyle] reported by reviewdog 🐶 Wrong order for 'java.io.File' import. Raw Output: /github/workspace/./src/test/java/org/mvplugins/multiverse/core/mock/MVWorldMock.java:8:1: warning: Wrong order for 'java.io.File' import. (com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck)

Expand Down

0 comments on commit 0b89738

Please sign in to comment.