Fix BanList command and other *list functionality

This commit is contained in:
md_5 2014-04-17 19:03:00 +10:00
parent efef1d30a2
commit 05b9fd72af
14 changed files with 36 additions and 85 deletions

View File

@ -1,27 +0,0 @@
From c76ad11c42cb3320ff61ecdd5d4934ea801b249d Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Thu, 17 Apr 2014 14:33:40 +1000
Subject: [PATCH] Disable BanList Command
Does not currently work correctly.
diff --git a/src/main/java/org/bukkit/command/defaults/BanListCommand.java b/src/main/java/org/bukkit/command/defaults/BanListCommand.java
index 5f3a6f2..331083f 100644
--- a/src/main/java/org/bukkit/command/defaults/BanListCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/BanListCommand.java
@@ -28,6 +28,12 @@ public class BanListCommand extends VanillaCommand {
@Override
public boolean execute(CommandSender sender, String currentAlias, String[] args) {
if (!testPermission(sender)) return true;
+ // Spigot start
+ if ( true )
+ {
+ sender.sendMessage( ChatColor.RED + "This command is currently disabled as it does not work correctly." );
+ }
+ // Spigot end
BanList.Type banType = BanList.Type.UUID;
if (args.length > 0) {
--
1.8.3.2

@ -1 +1 @@
Subproject commit 1ab090e71ea261fe38cef980bc2ebe696a494ea3
Subproject commit 5fc3995ea8e455fe25eedaa7e4c44d054270371d

View File

@ -1,4 +1,4 @@
From 0201039c8f4f9a6a4cefc836b6d5866a4e10fae0 Mon Sep 17 00:00:00 2001
From c21c052e42fcd93deab9697a730ad59a4f874ffa Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:07:39 +1000
Subject: [PATCH] POM Changes
@ -142,10 +142,10 @@ index 3d4395d..2b14bef 100644
<execution>
<phase>package</phase>
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 748d887..adeab3f 100644
index e33576d..f3d9979 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -303,7 +303,7 @@ public final class CraftServer implements Server {
@@ -310,7 +310,7 @@ public final class CraftServer implements Server {
loadIcon();
updater = new AutoUpdater(new BukkitDLUpdaterService(configuration.getString("auto-updater.host")), getLogger(), configuration.getString("auto-updater.preferred-channel"));

View File

@ -1,4 +1,4 @@
From b9a0cde3f43f2d85373c3a494dfb9c7bf9a4f9c8 Mon Sep 17 00:00:00 2001
From 45e658422839146811ddc9140d511f785b4c67c8 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 7 Jul 2013 09:32:53 +1000
Subject: [PATCH] Spigot Configuration
@ -54,10 +54,10 @@ index 0f97f78..13c0500 100644
this.world = new CraftWorld((WorldServer) this, gen, env);
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5f4bd23..ebaeb98 100644
index f3d9979..9f40d68 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -309,8 +309,10 @@ public final class CraftServer implements Server {
@@ -316,8 +316,10 @@ public final class CraftServer implements Server {
updater.getOnUpdate().addAll(configuration.getStringList("auto-updater.on-update"));
updater.check(serverVersion);
@ -70,15 +70,15 @@ index 5f4bd23..ebaeb98 100644
}
public boolean getCommandBlockOverride(String command) {
@@ -736,6 +738,7 @@ public final class CraftServer implements Server {
playerList.getIPBans().load();
playerList.getProfileBans().load();
@@ -751,6 +753,7 @@ public final class CraftServer implements Server {
logger.log(Level.WARNING, "Failed to load banned-players.json, " + ex.getMessage());
}
+ org.spigotmc.SpigotConfig.init(); // Spigot
for (WorldServer world : console.worlds) {
world.difficulty = difficulty;
world.setSpawnFlags(monsters, animals);
@@ -750,11 +753,14 @@ public final class CraftServer implements Server {
@@ -765,11 +768,14 @@ public final class CraftServer implements Server {
} else {
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
}

View File

@ -1,4 +1,4 @@
From bb48d36ef39d168169ba648695404764df103836 Mon Sep 17 00:00:00 2001
From bfb997415d03a4394c2594a4cc8e9111e963752b Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Wed, 27 Mar 2013 01:41:54 +0200
Subject: [PATCH] Close Unloaded Save Files
@ -18,10 +18,10 @@ index 900ed68..829f4a3 100644
public static synchronized RegionFile a(File file1, int i, int j) {
File file2 = new File(file1, "region");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ebaeb98..9abb380 100644
index 9f40d68..875f25f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -81,6 +81,8 @@ import net.minecraft.server.MinecraftServer;
@@ -86,6 +86,8 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.server.MobEffectList;
import net.minecraft.server.PropertyManager;
import net.minecraft.server.ServerCommand;
@ -30,7 +30,7 @@ index ebaeb98..9abb380 100644
import net.minecraft.server.ServerNBTManager;
import net.minecraft.server.WorldLoaderServer;
import net.minecraft.server.WorldManager;
@@ -1006,6 +1008,30 @@ public final class CraftServer implements Server {
@@ -1021,6 +1023,30 @@ public final class CraftServer implements Server {
worlds.remove(world.getName().toLowerCase());
console.worlds.remove(console.worlds.indexOf(handle));

View File

@ -1,14 +1,14 @@
From 6aa66419cb3e934c0e944a3c2cb6180a29963c4f Mon Sep 17 00:00:00 2001
From b54f2ca74f3ad0197f6e6752fa77331f692a1b01 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:05:54 +1000
Subject: [PATCH] Allow Disabling of Command TabComplete
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9abb380..2b6b9fb 100644
index 875f25f..2331d6a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1591,6 +1591,13 @@ public final class CraftServer implements Server {
@@ -1600,6 +1600,13 @@ public final class CraftServer implements Server {
}
public List<String> tabCompleteCommand(Player player, String message) {

View File

@ -1,4 +1,4 @@
From 652a3e1612be1d7961f48a10e2fc73358eb07170 Mon Sep 17 00:00:00 2001
From cc8dcd7fc704565b2e5cc4a9731254456909b6b1 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 19:21:58 +1000
Subject: [PATCH] Configurable Messages
@ -23,7 +23,7 @@ index 17e69db..b98079c 100644
this.b.close(chatcomponenttext);
} else {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 4977ea1..0208191 100644
index e1e0e92..2afba41 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -365,7 +365,7 @@ public abstract class PlayerList {
@ -45,10 +45,10 @@ index 4977ea1..0208191 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2b6b9fb..6e9f95e 100644
index 2331d6a..8d33f56 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -701,11 +701,7 @@ public final class CraftServer implements Server {
@@ -708,11 +708,7 @@ public final class CraftServer implements Server {
return true;
}

View File

@ -1,14 +1,14 @@
From 2cd0c48d4162d19b4eb6ff9e4c91bc13c89aa172 Mon Sep 17 00:00:00 2001
From b4c05848c289c74884e21c70ff99fc36fc8b36e9 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Wed, 12 Feb 2014 20:44:14 +0000
Subject: [PATCH] Allow vanilla commands to be the main version of a command
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e9f95e..4920956 100644
index 8d33f56..ddce3d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -116,6 +116,7 @@ import org.bukkit.command.CommandSender;
@@ -121,6 +121,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.command.SimpleCommandMap;
@ -16,7 +16,7 @@ index 6e9f95e..4920956 100644
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.configuration.serialization.ConfigurationSerialization;
@@ -381,8 +382,11 @@ public final class CraftServer implements Server {
@@ -388,8 +389,11 @@ public final class CraftServer implements Server {
}
if (type == PluginLoadOrder.POSTWORLD) {
@ -29,7 +29,7 @@ index 6e9f95e..4920956 100644
commandMap.registerServerAliases();
loadCustomPermissions();
DefaultPermissions.registerCorePermissions();
@@ -394,51 +398,64 @@ public final class CraftServer implements Server {
@@ -401,51 +405,64 @@ public final class CraftServer implements Server {
pluginManager.disablePlugins();
}

View File

@ -1,21 +1,21 @@
From a416b1a77ca43eae714a6b088167e31f9ba6d750 Mon Sep 17 00:00:00 2001
From 0075a3a74cd4e5fd1d1c77a27b4632606da7d19a Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Mon, 14 Apr 2014 17:21:24 +1000
Subject: [PATCH] Check for blank OfflinePlayer Names
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4920956..50a783e 100644
index ddce3d9..e98c1ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1304,6 +1304,7 @@ public final class CraftServer implements Server {
@@ -1319,6 +1319,7 @@ public final class CraftServer implements Server {
public OfflinePlayer getOfflinePlayer(String name) {
Validate.notNull(name, "Name cannot be null");
+ com.google.common.base.Preconditions.checkArgument( !org.apache.commons.lang.StringUtils.isBlank( name ), "Name cannot be blank" ); // Spigot
OfflinePlayer result = getPlayerExact(name);
if (result == null) {
// If the name given cannot ever be a valid username give a dummy return, for scoreboard plugins
if (!validUserPattern.matcher(name).matches()) {
--
1.8.3.2

View File

@ -1,22 +0,0 @@
From 3bc1834be633fb5334fe3ae092e918fc42a6845d Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Tue, 15 Apr 2014 12:17:27 +1000
Subject: [PATCH] Fix EditBookEvent
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index fd6e057..be8d72d 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1708,7 +1708,7 @@ public class PlayerConnection implements PacketPlayInListener {
itemstack1 = this.player.inventory.getItemInHand();
if (itemstack1 != null) {
if (itemstack.getItem() == Items.BOOK_AND_QUILL && itemstack.getItem() == itemstack1.getItem()) {
- itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8));
+ CraftEventFactory.handleEditBookEvent(player, itemstack); // Spigot
}
return;
--
1.8.3.2

View File

@ -1,4 +1,4 @@
From a131ef3c4f7aacc6beb1af01a7ad73a24b46eea4 Mon Sep 17 00:00:00 2001
From 36a609b6a7bf7ad658a1018997921c7bd0faf612 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 16 Apr 2014 09:46:48 +1000
Subject: [PATCH] Validate CraftSkull getOwner

View File

@ -1,4 +1,4 @@
From f5257108ff38e73deca1a2c6e17d451d8412cb6d Mon Sep 17 00:00:00 2001
From 9f03ca02e47d495436644f7ea610464e225e07e7 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 16 Apr 2014 10:09:56 +1000
Subject: [PATCH] Fix ban expire dates.

View File

@ -1,4 +1,4 @@
From 1ce14fb3e4bb416b32fc7dfd81d70289525843a2 Mon Sep 17 00:00:00 2001
From 0e528ef69bd5fd8bce2e8478c514832f671605e5 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 16 Apr 2014 11:14:38 +1000
Subject: [PATCH] Correct Ban Expiration

View File

@ -1,4 +1,4 @@
From 13fb31ca6e4afa040ee6108db64d8bdf50b88f8d Mon Sep 17 00:00:00 2001
From e7cf1c84bf12977ad68f5d61e1dfb6e416b729b2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 16 Apr 2014 01:40:30 -0400
Subject: [PATCH] Convert Horses owner to UUID