mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-12-03 13:33:22 +01:00
Added test
This commit is contained in:
parent
41b5ed6bc2
commit
e117fda5e8
15
pom.xml
15
pom.xml
@ -40,6 +40,7 @@
|
|||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.3</version>
|
<version>3.3</version>
|
||||||
@ -48,6 +49,7 @@
|
|||||||
<target>1.8</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
@ -61,6 +63,19 @@
|
|||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>3.0.0-M3</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.maven.surefire</groupId>
|
||||||
|
<artifactId>surefire-junit47</artifactId>
|
||||||
|
<version>3.0.0-M3</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
@ -18,9 +18,7 @@ public class AsyncCreatorAdapter implements CreatorAdapter {
|
|||||||
// Create worlds async to close #16
|
// Create worlds async to close #16
|
||||||
@Override
|
@Override
|
||||||
public void create(WorldCreator creator, SystemWorld sw, Runnable r) {
|
public void create(WorldCreator creator, SystemWorld sw, Runnable r) {
|
||||||
TaskManager.IMP.async(new Runnable() {
|
TaskManager.IMP.async(() -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
AsyncWorld world;
|
AsyncWorld world;
|
||||||
if (Bukkit.getWorld(creator.name()) == null)
|
if (Bukkit.getWorld(creator.name()) == null)
|
||||||
world = AsyncWorld.create(creator);
|
world = AsyncWorld.create(creator);
|
||||||
@ -38,7 +36,6 @@ public class AsyncCreatorAdapter implements CreatorAdapter {
|
|||||||
|
|
||||||
// Send the message
|
// Send the message
|
||||||
r.run();
|
r.run();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
package de.butzlabben.world.wrapper;
|
||||||
|
|
||||||
|
import org.bukkit.WorldCreator;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
public class GeneratorSettingsTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void asWorldCreator() {
|
||||||
|
GeneratorSettings settings = new GeneratorSettings();
|
||||||
|
WorldCreator creator = settings.asWorldCreator("test");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user