Skip to content

Commit 839bfe0

Browse files
committed
Update to Bukkit Development Builds
Change things so unit testing can run after Bukkit's breaking commit with classloader stuff
1 parent f39ef36 commit 839bfe0

File tree

9 files changed

+137
-8
lines changed

9 files changed

+137
-8
lines changed

Essentials/src/com/earth2me/essentials/Essentials.java

+12-1
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@
7474
import org.bukkit.plugin.PluginDescriptionFile;
7575
import org.bukkit.plugin.PluginManager;
7676
import org.bukkit.plugin.java.JavaPlugin;
77+
import org.bukkit.plugin.java.JavaPluginLoader;
7778
import org.bukkit.scheduler.BukkitScheduler;
7879
import org.bukkit.scheduler.BukkitTask;
7980
import org.yaml.snakeyaml.error.YAMLException;
8081

8182

8283
public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
8384
{
84-
public static final int BUKKIT_VERSION = 2882;
85+
public static final int BUKKIT_VERSION = 2985;
8586
private static final Logger LOGGER = Logger.getLogger("Essentials");
8687
private transient ISettings settings;
8788
private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this);
@@ -102,6 +103,16 @@ public class Essentials extends JavaPlugin implements net.ess3.api.IEssentials
102103
private transient List<String> vanishedPlayers = new ArrayList<String>();
103104
private transient SimpleCommandMap scm;
104105

106+
public Essentials()
107+
{
108+
109+
}
110+
111+
public Essentials(final Server server)
112+
{
113+
super(new JavaPluginLoader(server), new PluginDescriptionFile("Essentials", "", "com.earth2me.essentials.Essentials"), null, null);
114+
}
115+
105116
@Override
106117
public ISettings getSettings()
107118
{

Essentials/src/com/earth2me/essentials/OfflinePlayer.java

+96
Original file line numberDiff line numberDiff line change
@@ -474,30 +474,126 @@ public void awardAchievement(Achievement a)
474474
throw new UnsupportedOperationException(_("notSupportedYet"));
475475
}
476476

477+
@Override
478+
public void removeAchievement(Achievement achievement)
479+
{
480+
throw new UnsupportedOperationException(_("notSupportedYet"));
481+
}
482+
483+
@Override
484+
public boolean hasAchievement(Achievement achievement)
485+
{
486+
throw new UnsupportedOperationException(_("notSupportedYet"));
487+
}
488+
477489
@Override
478490
public void incrementStatistic(Statistic ststc)
479491
{
480492
throw new UnsupportedOperationException(_("notSupportedYet"));
481493
}
482494

495+
@Override
496+
public void decrementStatistic(Statistic statistic) throws IllegalArgumentException
497+
{
498+
throw new UnsupportedOperationException(_("notSupportedYet"));
499+
}
500+
483501
@Override
484502
public void incrementStatistic(Statistic ststc, int i)
485503
{
486504
throw new UnsupportedOperationException(_("notSupportedYet"));
487505
}
488506

507+
@Override
508+
public void decrementStatistic(Statistic statistic, int i) throws IllegalArgumentException
509+
{
510+
throw new UnsupportedOperationException(_("notSupportedYet"));
511+
}
512+
513+
@Override
514+
public void setStatistic(Statistic statistic, int i) throws IllegalArgumentException
515+
{
516+
throw new UnsupportedOperationException(_("notSupportedYet"));
517+
}
518+
519+
@Override
520+
public int getStatistic(Statistic statistic) throws IllegalArgumentException
521+
{
522+
throw new UnsupportedOperationException(_("notSupportedYet"));
523+
}
524+
489525
@Override
490526
public void incrementStatistic(Statistic ststc, Material mtrl)
491527
{
492528
throw new UnsupportedOperationException(_("notSupportedYet"));
493529
}
494530

531+
@Override
532+
public void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException
533+
{
534+
throw new UnsupportedOperationException(_("notSupportedYet"));
535+
}
536+
537+
@Override
538+
public int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException
539+
{
540+
throw new UnsupportedOperationException(_("notSupportedYet"));
541+
}
542+
495543
@Override
496544
public void incrementStatistic(Statistic ststc, Material mtrl, int i)
497545
{
498546
throw new UnsupportedOperationException(_("notSupportedYet"));
499547
}
500548

549+
@Override
550+
public void decrementStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
551+
{
552+
throw new UnsupportedOperationException(_("notSupportedYet"));
553+
}
554+
555+
@Override
556+
public void setStatistic(Statistic statistic, Material material, int i) throws IllegalArgumentException
557+
{
558+
throw new UnsupportedOperationException(_("notSupportedYet"));
559+
}
560+
561+
@Override
562+
public void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
563+
{
564+
throw new UnsupportedOperationException(_("notSupportedYet"));
565+
}
566+
567+
@Override
568+
public void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
569+
{
570+
throw new UnsupportedOperationException(_("notSupportedYet"));
571+
}
572+
573+
@Override
574+
public int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException
575+
{
576+
throw new UnsupportedOperationException(_("notSupportedYet"));
577+
}
578+
579+
@Override
580+
public void incrementStatistic(Statistic statistic, EntityType entityType, int i) throws IllegalArgumentException
581+
{
582+
throw new UnsupportedOperationException(_("notSupportedYet"));
583+
}
584+
585+
@Override
586+
public void decrementStatistic(Statistic statistic, EntityType entityType, int i)
587+
{
588+
throw new UnsupportedOperationException(_("notSupportedYet"));
589+
}
590+
591+
@Override
592+
public void setStatistic(Statistic statistic, EntityType entityType, int i)
593+
{
594+
throw new UnsupportedOperationException(_("notSupportedYet"));
595+
}
596+
501597
@Override
502598
public void playNote(Location lctn, byte b, byte b1)
503599
{

Essentials/test/com/earth2me/essentials/EconomyTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class EconomyTest extends TestCase
1919
public EconomyTest(final String testName)
2020
{
2121
super(testName);
22-
ess = new Essentials();
2322
final FakeServer server = new FakeServer();
2423
server.createWorld("testWorld", Environment.NORMAL);
24+
ess = new Essentials(server);
2525
try
2626
{
2727
ess.setupForTesting(server);

Essentials/test/com/earth2me/essentials/FakeServer.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ public String getMotd()
11361136
@Override
11371137
public WarningState getWarningState()
11381138
{
1139-
throw new UnsupportedOperationException("Not supported yet.");
1139+
return WarningState.DEFAULT;
11401140
}
11411141

11421142
@Override
@@ -1177,4 +1177,22 @@ public CachedServerIcon loadServerIcon(File file) throws IllegalArgumentExceptio
11771177
public CachedServerIcon loadServerIcon(BufferedImage bufferedImage) throws IllegalArgumentException, Exception {
11781178
throw new UnsupportedOperationException("Not supported yet.");
11791179
}
1180+
1181+
@Override
1182+
public void setIdleTimeout(int i)
1183+
{
1184+
throw new UnsupportedOperationException("Not supported yet.");
1185+
}
1186+
1187+
@Override
1188+
public int getIdleTimeout()
1189+
{
1190+
throw new UnsupportedOperationException("Not supported yet.");
1191+
}
1192+
1193+
@Override
1194+
public UnsafeValues getUnsafe()
1195+
{
1196+
throw new UnsupportedOperationException("Not supported yet.");
1197+
}
11801198
}

Essentials/test/com/earth2me/essentials/StorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class StorageTest extends TestCase
1717

1818
public StorageTest()
1919
{
20-
ess = new Essentials();
2120
server = new FakeServer();
2221
world = server.createWorld("testWorld", Environment.NORMAL);
22+
ess = new Essentials(server);
2323
try
2424
{
2525
ess.setupForTesting(server);

Essentials/test/com/earth2me/essentials/ToggleTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public class ToggleTest extends TestCase
1818
public ToggleTest(String testName)
1919
{
2020
super(testName);
21-
ess = new Essentials();
2221
server = new FakeServer();
2322
server.createWorld("testWorld", Environment.NORMAL);
23+
ess = new Essentials(server);
2424
try
2525
{
2626
ess.setupForTesting(server);

Essentials/test/com/earth2me/essentials/UserTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class UserTest extends TestCase
1717
public UserTest(String testName)
1818
{
1919
super(testName);
20-
ess = new Essentials();
2120
server = new FakeServer();
2221
server.createWorld("testWorld", Environment.NORMAL);
22+
ess = new Essentials(server);
2323
try
2424
{
2525
ess.setupForTesting(server);

Essentials/test/com/earth2me/essentials/UtilTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class UtilTest extends TestCase
1919

2020
public UtilTest()
2121
{
22-
ess = new Essentials();
2322
server = new FakeServer();
2423
server.createWorld("testWorld", Environment.NORMAL);
24+
ess = new Essentials(server);
2525
try
2626
{
2727
ess.setupForTesting(server);

pom.xml

+5-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
<id>ess-repo</id>
4545
<url>http://repo.ess3.net/content/groups/public</url>
4646
</repository>
47+
<repository>
48+
<id>bukkit-repo</id>
49+
<url>http://repo.bukkit.org/content/groups/public</url>
50+
</repository>
4751
</repositories>
4852

4953
<distributionManagement>
@@ -71,7 +75,7 @@
7175
<dependency>
7276
<groupId>org.bukkit</groupId>
7377
<artifactId>bukkit</artifactId>
74-
<version>1.7.2-R0.1</version>
78+
<version>1.7.2-R0.3-SNAPSHOT</version>
7579
</dependency>
7680
<dependency>
7781
<groupId>junit</groupId>

0 commit comments

Comments
 (0)