summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Ward <chris@chrisgward.com>2014-01-20 21:20:13 +1100
committerChris Ward <chris@chrisgward.com>2014-01-20 21:20:13 +1100
commit3495fc89820c04c0db615c066fcffcf157e60ea6 (patch)
tree2b93daf53cb504e8486ab98c06114e8c4538e704
parent9432765479ebc6b8ccfb523817ca4ad98e11b08b (diff)
downloadEssentials-3495fc89820c04c0db615c066fcffcf157e60ea6.tar
Essentials-3495fc89820c04c0db615c066fcffcf157e60ea6.tar.gz
Essentials-3495fc89820c04c0db615c066fcffcf157e60ea6.tar.lz
Essentials-3495fc89820c04c0db615c066fcffcf157e60ea6.tar.xz
Essentials-3495fc89820c04c0db615c066fcffcf157e60ea6.zip
Update to Bukkit Development Builds
Change things so unit testing can run after Bukkit's breaking commit with classloader stuff
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java13
-rw-r--r--Essentials/src/com/earth2me/essentials/OfflinePlayer.java96
-rw-r--r--Essentials/test/com/earth2me/essentials/EconomyTest.java2
-rw-r--r--Essentials/test/com/earth2me/essentials/FakeServer.java20
-rw-r--r--Essentials/test/com/earth2me/essentials/StorageTest.java2
-rw-r--r--Essentials/test/com/earth2me/essentials/ToggleTest.java2
-rw-r--r--Essentials/test/com/earth2me/essentials/UserTest.java2
-rw-r--r--Essentials/test/com/earth2me/essentials/UtilTest.java2
-rw-r--r--pom.xml6
9 files changed, 137 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index d932e65f7..a7e9e2e71 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -74,6 +74,7 @@ import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
+import org.bukkit.plugin.java.JavaPluginLoader;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
import org.yaml.snakeyaml.error.YAMLException;
@@ -81,7 +82,7 @@ import org.yaml.snakeyaml.error.YAMLException;
public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
{
- public static final int BUKKIT_VERSION = 2882;
+ public static final int BUKKIT_VERSION = 2985;
private static final Logger LOGGER = Logger.getLogger("Essentials");
private transient ISettings settings;
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
@@ -102,6 +103,16 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
private transient List<String> vanishedPlayers = new ArrayList<String>();
private transient SimpleCommandMap scm;
+ public Essentials()
+ {
+
+ }
+
+ public Essentials(final Server server)
+ {
+ super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
+ }
+
@Override
public ISettings getSettings()
{
diff --git a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
index 10e205a65..c06f6888e 100644
--- a/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
+++ b/Essentials/src/com/earth2me/essentials/OfflinePlayer.java
@@ -475,30 +475,126 @@ public class OfflinePlayer implements Player
}
@Override
+ public void removeAchievement(Achievement achievement)
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public boolean hasAchievement(Achievement achievement)
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
public void incrementStatistic(Statistic ststc)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
+ public void decrementStatistic(Statistic statistic) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
public void incrementStatistic(Statistic ststc, int i)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
+ public void decrementStatistic(Statistic statistic, int i) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void setStatistic(Statistic statistic, int i) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public int getStatistic(Statistic statistic) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
public void incrementStatistic(Statistic ststc, Material mtrl)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
+ public void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
}
@Override
+ public void decrementStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void setStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void incrementStatistic(Statistic statistic, EntityType entityType, int i) throws IllegalArgumentException
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void decrementStatistic(Statistic statistic, EntityType entityType, int i)
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
+ public void setStatistic(Statistic statistic, EntityType entityType, int i)
+ {
+ throw new UnsupportedOperationException(_("notSupportedYet"));
+ }
+
+ @Override
public void playNote(Location lctn, byte b, byte b1)
{
throw new UnsupportedOperationException(_("notSupportedYet"));
diff --git a/Essentials/test/com/earth2me/essentials/EconomyTest.java b/Essentials/test/com/earth2me/essentials/EconomyTest.java
index de73cc15e..648113c0b 100644
--- a/Essentials/test/com/earth2me/essentials/EconomyTest.java
+++ b/Essentials/test/com/earth2me/essentials/EconomyTest.java
@@ -19,9 +19,9 @@ public class EconomyTest extends TestCase
public EconomyTest(final String testName)
{
super(testName);
- ess = new Essentials();
final FakeServer server = new FakeServer();
server.createWorld("testWorld", Environment.NORMAL);
+ ess = new Essentials(server);
try
{
ess.setupForTesting(server);
diff --git a/Essentials/test/com/earth2me/essentials/FakeServer.java b/Essentials/test/com/earth2me/essentials/FakeServer.java
index 10b6a14de..b16ff3ea0 100644
--- a/Essentials/test/com/earth2me/essentials/FakeServer.java
+++ b/Essentials/test/com/earth2me/essentials/FakeServer.java
@@ -1136,7 +1136,7 @@ public class FakeServer implements Server
@Override
public WarningState getWarningState()
{
- throw new UnsupportedOperationException("Not supported yet.");
+ return WarningState.DEFAULT;
}
@Override
@@ -1177,4 +1177,22 @@ public class FakeServer implements Server
public CachedServerIcon loadServerIcon(BufferedImage bufferedImage) throws IllegalArgumentException, Exception {
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public void setIdleTimeout(int i)
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public int getIdleTimeout()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public UnsafeValues getUnsafe()
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
}
diff --git a/Essentials/test/com/earth2me/essentials/StorageTest.java b/Essentials/test/com/earth2me/essentials/StorageTest.java
index bde770997..0412e2264 100644
--- a/Essentials/test/com/earth2me/essentials/StorageTest.java
+++ b/Essentials/test/com/earth2me/essentials/StorageTest.java
@@ -17,9 +17,9 @@ public class StorageTest extends TestCase
public StorageTest()
{
- ess = new Essentials();
server = new FakeServer();
world = server.createWorld("testWorld", Environment.NORMAL);
+ ess = new Essentials(server);
try
{
ess.setupForTesting(server);
diff --git a/Essentials/test/com/earth2me/essentials/ToggleTest.java b/Essentials/test/com/earth2me/essentials/ToggleTest.java
index e66d7a9c7..c45bd3916 100644
--- a/Essentials/test/com/earth2me/essentials/ToggleTest.java
+++ b/Essentials/test/com/earth2me/essentials/ToggleTest.java
@@ -18,9 +18,9 @@ public class ToggleTest extends TestCase
public ToggleTest(String testName)
{
super(testName);
- ess = new Essentials();
server = new FakeServer();
server.createWorld("testWorld", Environment.NORMAL);
+ ess = new Essentials(server);
try
{
ess.setupForTesting(server);
diff --git a/Essentials/test/com/earth2me/essentials/UserTest.java b/Essentials/test/com/earth2me/essentials/UserTest.java
index 150f9653d..24d39cc0f 100644
--- a/Essentials/test/com/earth2me/essentials/UserTest.java
+++ b/Essentials/test/com/earth2me/essentials/UserTest.java
@@ -17,9 +17,9 @@ public class UserTest extends TestCase
public UserTest(String testName)
{
super(testName);
- ess = new Essentials();
server = new FakeServer();
server.createWorld("testWorld", Environment.NORMAL);
+ ess = new Essentials(server);
try
{
ess.setupForTesting(server);
diff --git a/Essentials/test/com/earth2me/essentials/UtilTest.java b/Essentials/test/com/earth2me/essentials/UtilTest.java
index 53f79d387..497d26d7a 100644
--- a/Essentials/test/com/earth2me/essentials/UtilTest.java
+++ b/Essentials/test/com/earth2me/essentials/UtilTest.java
@@ -19,9 +19,9 @@ public class UtilTest extends TestCase
public UtilTest()
{
- ess = new Essentials();
server = new FakeServer();
server.createWorld("testWorld", Environment.NORMAL);
+ ess = new Essentials(server);
try
{
ess.setupForTesting(server);
diff --git a/pom.xml b/pom.xml
index 1aafcc580..a6764ecb1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,6 +44,10 @@
<id>ess-repo</id>
<url>http://repo.ess3.net/content/groups/public</url>
</repository>
+ <repository>
+ <id>bukkit-repo</id>
+ <url>http://repo.bukkit.org/content/groups/public</url>
+ </repository>
</repositories>
<distributionManagement>
@@ -71,7 +75,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
- <version>1.7.2-R0.1</version>
+ <version>1.7.2-R0.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>