mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Update to Bukkit Development Builds
Change things so unit testing can run after Bukkit's breaking commit with classloader stuff
This commit is contained in:
parent
f39ef36115
commit
839bfe0c2e
9 changed files with 137 additions and 8 deletions
|
@ -74,6 +74,7 @@ import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginDescriptionFile;
|
import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.plugin.java.JavaPluginLoader;
|
||||||
import org.bukkit.scheduler.BukkitScheduler;
|
import org.bukkit.scheduler.BukkitScheduler;
|
||||||
import org.bukkit.scheduler.BukkitTask;
|
import org.bukkit.scheduler.BukkitTask;
|
||||||
import org.yaml.snakeyaml.error.YAMLException;
|
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 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 static final Logger LOGGER = Logger.getLogger("Essentials");
|
||||||
private transient ISettings settings;
|
private transient ISettings settings;
|
||||||
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
|
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 List<String> vanishedPlayers = new ArrayList<String>();
|
||||||
private transient SimpleCommandMap scm;
|
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
|
@Override
|
||||||
public ISettings getSettings()
|
public ISettings getSettings()
|
||||||
{
|
{
|
||||||
|
|
|
@ -474,30 +474,126 @@ public class OfflinePlayer implements Player
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeAchievement(Achievement achievement)
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasAchievement(Achievement achievement)
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void incrementStatistic(Statistic ststc)
|
public void incrementStatistic(Statistic ststc)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void decrementStatistic(Statistic statistic) throws IllegalArgumentException
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException(_("notSupportedYet"));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void incrementStatistic(Statistic ststc, int i)
|
public void incrementStatistic(Statistic ststc, int i)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
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
|
@Override
|
||||||
public void incrementStatistic(Statistic ststc, Material mtrl)
|
public void incrementStatistic(Statistic ststc, Material mtrl)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
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
|
@Override
|
||||||
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
|
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException(_("notSupportedYet"));
|
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
|
@Override
|
||||||
public void playNote(Location lctn, byte b, byte b1)
|
public void playNote(Location lctn, byte b, byte b1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,9 +19,9 @@ public class EconomyTest extends TestCase
|
||||||
public EconomyTest(final String testName)
|
public EconomyTest(final String testName)
|
||||||
{
|
{
|
||||||
super(testName);
|
super(testName);
|
||||||
ess = new Essentials();
|
|
||||||
final FakeServer server = new FakeServer();
|
final FakeServer server = new FakeServer();
|
||||||
server.createWorld("testWorld", Environment.NORMAL);
|
server.createWorld("testWorld", Environment.NORMAL);
|
||||||
|
ess = new Essentials(server);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
|
@ -1136,7 +1136,7 @@ public class FakeServer implements Server
|
||||||
@Override
|
@Override
|
||||||
public WarningState getWarningState()
|
public WarningState getWarningState()
|
||||||
{
|
{
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
return WarningState.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1177,4 +1177,22 @@ public class FakeServer implements Server
|
||||||
public CachedServerIcon loadServerIcon(BufferedImage bufferedImage) throws IllegalArgumentException, Exception {
|
public CachedServerIcon loadServerIcon(BufferedImage bufferedImage) throws IllegalArgumentException, Exception {
|
||||||
throw new UnsupportedOperationException("Not supported yet.");
|
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.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@ public class StorageTest extends TestCase
|
||||||
|
|
||||||
public StorageTest()
|
public StorageTest()
|
||||||
{
|
{
|
||||||
ess = new Essentials();
|
|
||||||
server = new FakeServer();
|
server = new FakeServer();
|
||||||
world = server.createWorld("testWorld", Environment.NORMAL);
|
world = server.createWorld("testWorld", Environment.NORMAL);
|
||||||
|
ess = new Essentials(server);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
|
@ -18,9 +18,9 @@ public class ToggleTest extends TestCase
|
||||||
public ToggleTest(String testName)
|
public ToggleTest(String testName)
|
||||||
{
|
{
|
||||||
super(testName);
|
super(testName);
|
||||||
ess = new Essentials();
|
|
||||||
server = new FakeServer();
|
server = new FakeServer();
|
||||||
server.createWorld("testWorld", Environment.NORMAL);
|
server.createWorld("testWorld", Environment.NORMAL);
|
||||||
|
ess = new Essentials(server);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
|
@ -17,9 +17,9 @@ public class UserTest extends TestCase
|
||||||
public UserTest(String testName)
|
public UserTest(String testName)
|
||||||
{
|
{
|
||||||
super(testName);
|
super(testName);
|
||||||
ess = new Essentials();
|
|
||||||
server = new FakeServer();
|
server = new FakeServer();
|
||||||
server.createWorld("testWorld", Environment.NORMAL);
|
server.createWorld("testWorld", Environment.NORMAL);
|
||||||
|
ess = new Essentials(server);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
|
@ -19,9 +19,9 @@ public class UtilTest extends TestCase
|
||||||
|
|
||||||
public UtilTest()
|
public UtilTest()
|
||||||
{
|
{
|
||||||
ess = new Essentials();
|
|
||||||
server = new FakeServer();
|
server = new FakeServer();
|
||||||
server.createWorld("testWorld", Environment.NORMAL);
|
server.createWorld("testWorld", Environment.NORMAL);
|
||||||
|
ess = new Essentials(server);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ess.setupForTesting(server);
|
ess.setupForTesting(server);
|
||||||
|
|
6
pom.xml
6
pom.xml
|
@ -44,6 +44,10 @@
|
||||||
<id>ess-repo</id>
|
<id>ess-repo</id>
|
||||||
<url>http://repo.ess3.net/content/groups/public</url>
|
<url>http://repo.ess3.net/content/groups/public</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>bukkit-repo</id>
|
||||||
|
<url>http://repo.bukkit.org/content/groups/public</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
|
@ -71,7 +75,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>bukkit</artifactId>
|
<artifactId>bukkit</artifactId>
|
||||||
<version>1.7.2-R0.1</version>
|
<version>1.7.2-R0.3-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
|
|
Loading…
Reference in a new issue