summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/CommandGamerule.patch25
-rw-r--r--nms-patches/EntityHuman.patch8
-rw-r--r--nms-patches/ICommand.patch6
3 files changed, 32 insertions, 7 deletions
diff --git a/nms-patches/CommandGamerule.patch b/nms-patches/CommandGamerule.patch
new file mode 100644
index 00000000..30d67f7f
--- /dev/null
+++ b/nms-patches/CommandGamerule.patch
@@ -0,0 +1,25 @@
+--- ../work/decompile-8eb82bde/net/minecraft/server/CommandGamerule.java 2014-12-10 16:21:38.404579167 +0000
++++ src/main/java/net/minecraft/server/CommandGamerule.java 2014-12-10 16:18:45.268581046 +0000
+@@ -19,8 +19,8 @@
+ return "commands.gamerule.usage";
+ }
+
+- public void execute(ICommandListener icommandlistener, String[] astring) {
+- GameRules gamerules = this.d();
++ public void execute(ICommandListener icommandlistener, String[] astring) throws CommandException { // CraftBukkit - added throws
++ GameRules gamerules = icommandlistener.getWorld().getGameRules(); // Use current world
+ String s = astring.length > 0 ? astring[0] : "";
+ String s1 = astring.length > 1 ? a(astring, 1) : "";
+
+@@ -85,4 +85,11 @@
+ private GameRules d() {
+ return MinecraftServer.getServer().getWorldServer(0).getGameRules();
+ }
++
++ // CraftBukkit start - fix decompile error
++ @Override
++ public int compareTo(Object o) {
++ return a((ICommand) o);
++ }
++ // CraftBukkit end
+ }
diff --git a/nms-patches/EntityHuman.patch b/nms-patches/EntityHuman.patch
index 935dc5c0..ca770d2c 100644
--- a/nms-patches/EntityHuman.patch
+++ b/nms-patches/EntityHuman.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/EntityHuman.java 2014-12-07 11:26:13.489010423 +0000
-+++ src/main/java/net/minecraft/server/EntityHuman.java 2014-12-07 11:25:50.801010669 +0000
+--- ../work/decompile-8eb82bde/net/minecraft/server/EntityHuman.java 2014-12-10 16:27:47.832575157 +0000
++++ src/main/java/net/minecraft/server/EntityHuman.java 2014-12-10 16:27:27.556575377 +0000
@@ -8,13 +8,27 @@
import java.util.List;
import java.util.UUID;
@@ -112,14 +112,14 @@
this.addScore(i);
- Collection collection = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.f);
+ // CraftBukkit - Get our scores instead
-+ Collection<ScoreboardScore> collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.e, this.getName(), new java.util.ArrayList<ScoreboardScore>());
++ Collection<ScoreboardScore> collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.f, this.getName(), new java.util.ArrayList<ScoreboardScore>());
+
if (entity instanceof EntityHuman) {
this.b(StatisticList.B);
- collection.addAll(this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.e));
+ // CraftBukkit - Get our scores instead
-+ this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.d, this.getName(), collection);
++ this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.e, this.getName(), collection);
collection.addAll(this.e(entity));
} else {
this.b(StatisticList.z);
diff --git a/nms-patches/ICommand.patch b/nms-patches/ICommand.patch
index f42a35f4..f3f78b5e 100644
--- a/nms-patches/ICommand.patch
+++ b/nms-patches/ICommand.patch
@@ -1,11 +1,11 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/ICommand.java 2014-11-29 00:40:43.197707433 +0000
-+++ src/main/java/net/minecraft/server/ICommand.java 2014-11-29 00:40:17.000000000 +0000
+--- ../work/decompile-8eb82bde/net/minecraft/server/ICommand.java 2014-12-10 16:21:38.812579162 +0000
++++ src/main/java/net/minecraft/server/ICommand.java 2014-12-10 16:18:07.164581460 +0000
@@ -10,7 +10,7 @@
List b();
- void execute(ICommandListener icommandlistener, String[] astring);
-+ void execute(ICommandListener icommandlistener, String[] astring) throws ExceptionUsage; // CraftBukkit - Add exception
++ void execute(ICommandListener icommandlistener, String[] astring) throws ExceptionUsage, CommandException; // CraftBukkit - Add exception
boolean canUse(ICommandListener icommandlistener);