mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Would this classify as a test case?
This commit is contained in:
parent
9fcab4ba87
commit
b47231ca8c
@ -90,5 +90,10 @@
|
|||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${project.basedir}/lib/plotme-0.13f.jar</systemPath>
|
<systemPath>${project.basedir}/lib/plotme-0.13f.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.11</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
17
PlotSquared/src/main/java/PlotTesting/Test1.java
Normal file
17
PlotSquared/src/main/java/PlotTesting/Test1.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
package PlotTesting;
|
||||||
|
|
||||||
|
import org.junit.Assert;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.intellectualcrafters.plot.PlotHelper;
|
||||||
|
import com.intellectualcrafters.plot.PlotMain;
|
||||||
|
|
||||||
|
public class Test1 {
|
||||||
|
|
||||||
|
// I have no idea what I should actually test :p
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSquare() {
|
||||||
|
Assert.assertEquals(PlotHelper.square(5), 25);
|
||||||
|
}
|
||||||
|
}
|
@ -697,8 +697,15 @@ public class PlotMain extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
if (getServer().getPluginManager().getPlugin("WorldEdit") != null) {
|
if (getServer().getPluginManager().getPlugin("WorldEdit") != null) {
|
||||||
worldEdit = (WorldEditPlugin) getServer().getPluginManager().getPlugin("WorldEdit");
|
worldEdit = (WorldEditPlugin) getServer().getPluginManager().getPlugin("WorldEdit");
|
||||||
|
|
||||||
|
String version = worldEdit.getDescription().getVersion();
|
||||||
|
if (version!=null && version.startsWith("5")) {
|
||||||
|
PlotMain.sendConsoleSenderMessage("&cPlease update to WorldEdit 6 for improved stability and additional features:\nhttp://builds.enginehub.org/job/worldedit");
|
||||||
|
}
|
||||||
|
else {
|
||||||
getServer().getPluginManager().registerEvents(new WorldEditListener(), this);
|
getServer().getPluginManager().registerEvents(new WorldEditListener(), this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (Settings.WORLDGUARD) {
|
if (Settings.WORLDGUARD) {
|
||||||
if (getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
if (getServer().getPluginManager().getPlugin("WorldGuard") != null) {
|
||||||
worldGuard = (WorldGuardPlugin) getServer().getPluginManager().getPlugin("WorldGuard");
|
worldGuard = (WorldGuardPlugin) getServer().getPluginManager().getPlugin("WorldGuard");
|
||||||
|
Loading…
Reference in New Issue
Block a user