From 05b9fd72af72fc09679cd2bd996651fcf806e497 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 17 Apr 2014 19:03:00 +1000 Subject: [PATCH] Fix BanList command and other *list functionality --- .../0026-Disable-BanList-Command.patch | 27 ------------------- CraftBukkit | 2 +- CraftBukkit-Patches/0001-POM-Changes.patch | 6 ++--- .../0005-Spigot-Configuration.patch | 14 +++++----- .../0026-Close-Unloaded-Save-Files.patch | 8 +++--- ...low-Disabling-of-Command-TabComplete.patch | 6 ++--- .../0036-Configurable-Messages.patch | 8 +++--- ...mmands-to-be-the-main-version-of-a-c.patch | 10 +++---- ...-Check-for-blank-OfflinePlayer-Names.patch | 10 +++---- .../0139-Fix-EditBookEvent.patch | 22 --------------- ...> 0139-Validate-CraftSkull-getOwner.patch} | 2 +- ....patch => 0140-Fix-ban-expire-dates.patch} | 2 +- ...atch => 0141-Correct-Ban-Expiration.patch} | 2 +- ...> 0142-Convert-Horses-owner-to-UUID.patch} | 2 +- 14 files changed, 36 insertions(+), 85 deletions(-) delete mode 100644 Bukkit-Patches/0026-Disable-BanList-Command.patch delete mode 100644 CraftBukkit-Patches/0139-Fix-EditBookEvent.patch rename CraftBukkit-Patches/{0140-Validate-CraftSkull-getOwner.patch => 0139-Validate-CraftSkull-getOwner.patch} (91%) rename CraftBukkit-Patches/{0141-Fix-ban-expire-dates.patch => 0140-Fix-ban-expire-dates.patch} (92%) rename CraftBukkit-Patches/{0142-Correct-Ban-Expiration.patch => 0141-Correct-Ban-Expiration.patch} (93%) rename CraftBukkit-Patches/{0143-Convert-Horses-owner-to-UUID.patch => 0142-Convert-Horses-owner-to-UUID.patch} (94%) diff --git a/Bukkit-Patches/0026-Disable-BanList-Command.patch b/Bukkit-Patches/0026-Disable-BanList-Command.patch deleted file mode 100644 index 8a08b30..0000000 --- a/Bukkit-Patches/0026-Disable-BanList-Command.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c76ad11c42cb3320ff61ecdd5d4934ea801b249d Mon Sep 17 00:00:00 2001 -From: md_5 -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 - diff --git a/CraftBukkit b/CraftBukkit index 1ab090e..5fc3995 160000 --- a/CraftBukkit +++ b/CraftBukkit @@ -1 +1 @@ -Subproject commit 1ab090e71ea261fe38cef980bc2ebe696a494ea3 +Subproject commit 5fc3995ea8e455fe25eedaa7e4c44d054270371d diff --git a/CraftBukkit-Patches/0001-POM-Changes.patch b/CraftBukkit-Patches/0001-POM-Changes.patch index 6cb96b4..bcf2f53 100644 --- a/CraftBukkit-Patches/0001-POM-Changes.patch +++ b/CraftBukkit-Patches/0001-POM-Changes.patch @@ -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 Date: Tue, 2 Jul 2013 13:07:39 +1000 Subject: [PATCH] POM Changes @@ -142,10 +142,10 @@ index 3d4395d..2b14bef 100644 package 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")); diff --git a/CraftBukkit-Patches/0005-Spigot-Configuration.patch b/CraftBukkit-Patches/0005-Spigot-Configuration.patch index 3ace44e..1428cba 100644 --- a/CraftBukkit-Patches/0005-Spigot-Configuration.patch +++ b/CraftBukkit-Patches/0005-Spigot-Configuration.patch @@ -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 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(); } diff --git a/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch b/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch index 43217b9..5e0e8d2 100644 --- a/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch +++ b/CraftBukkit-Patches/0026-Close-Unloaded-Save-Files.patch @@ -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 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)); diff --git a/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-TabComplete.patch b/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-TabComplete.patch index af84d21..0beb8b9 100644 --- a/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-TabComplete.patch +++ b/CraftBukkit-Patches/0035-Allow-Disabling-of-Command-TabComplete.patch @@ -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 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 tabCompleteCommand(Player player, String message) { diff --git a/CraftBukkit-Patches/0036-Configurable-Messages.patch b/CraftBukkit-Patches/0036-Configurable-Messages.patch index f2b228c..f238943 100644 --- a/CraftBukkit-Patches/0036-Configurable-Messages.patch +++ b/CraftBukkit-Patches/0036-Configurable-Messages.patch @@ -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 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; } diff --git a/CraftBukkit-Patches/0107-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch b/CraftBukkit-Patches/0107-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch index 22b22b3..b5bd514 100644 --- a/CraftBukkit-Patches/0107-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch +++ b/CraftBukkit-Patches/0107-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch @@ -1,14 +1,14 @@ -From 2cd0c48d4162d19b4eb6ff9e4c91bc13c89aa172 Mon Sep 17 00:00:00 2001 +From b4c05848c289c74884e21c70ff99fc36fc8b36e9 Mon Sep 17 00:00:00 2001 From: Thinkofdeath 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(); } diff --git a/CraftBukkit-Patches/0136-Check-for-blank-OfflinePlayer-Names.patch b/CraftBukkit-Patches/0136-Check-for-blank-OfflinePlayer-Names.patch index b8ab230..7180ce1 100644 --- a/CraftBukkit-Patches/0136-Check-for-blank-OfflinePlayer-Names.patch +++ b/CraftBukkit-Patches/0136-Check-for-blank-OfflinePlayer-Names.patch @@ -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 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 diff --git a/CraftBukkit-Patches/0139-Fix-EditBookEvent.patch b/CraftBukkit-Patches/0139-Fix-EditBookEvent.patch deleted file mode 100644 index c0bc8e1..0000000 --- a/CraftBukkit-Patches/0139-Fix-EditBookEvent.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3bc1834be633fb5334fe3ae092e918fc42a6845d Mon Sep 17 00:00:00 2001 -From: mrapple -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 - diff --git a/CraftBukkit-Patches/0140-Validate-CraftSkull-getOwner.patch b/CraftBukkit-Patches/0139-Validate-CraftSkull-getOwner.patch similarity index 91% rename from CraftBukkit-Patches/0140-Validate-CraftSkull-getOwner.patch rename to CraftBukkit-Patches/0139-Validate-CraftSkull-getOwner.patch index 08a6d19..68285b8 100644 --- a/CraftBukkit-Patches/0140-Validate-CraftSkull-getOwner.patch +++ b/CraftBukkit-Patches/0139-Validate-CraftSkull-getOwner.patch @@ -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 Date: Wed, 16 Apr 2014 09:46:48 +1000 Subject: [PATCH] Validate CraftSkull getOwner diff --git a/CraftBukkit-Patches/0141-Fix-ban-expire-dates.patch b/CraftBukkit-Patches/0140-Fix-ban-expire-dates.patch similarity index 92% rename from CraftBukkit-Patches/0141-Fix-ban-expire-dates.patch rename to CraftBukkit-Patches/0140-Fix-ban-expire-dates.patch index 4c0f245..d50eb7d 100644 --- a/CraftBukkit-Patches/0141-Fix-ban-expire-dates.patch +++ b/CraftBukkit-Patches/0140-Fix-ban-expire-dates.patch @@ -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 Date: Wed, 16 Apr 2014 10:09:56 +1000 Subject: [PATCH] Fix ban expire dates. diff --git a/CraftBukkit-Patches/0142-Correct-Ban-Expiration.patch b/CraftBukkit-Patches/0141-Correct-Ban-Expiration.patch similarity index 93% rename from CraftBukkit-Patches/0142-Correct-Ban-Expiration.patch rename to CraftBukkit-Patches/0141-Correct-Ban-Expiration.patch index 931ea3d..5361bbe 100644 --- a/CraftBukkit-Patches/0142-Correct-Ban-Expiration.patch +++ b/CraftBukkit-Patches/0141-Correct-Ban-Expiration.patch @@ -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 Date: Wed, 16 Apr 2014 11:14:38 +1000 Subject: [PATCH] Correct Ban Expiration diff --git a/CraftBukkit-Patches/0143-Convert-Horses-owner-to-UUID.patch b/CraftBukkit-Patches/0142-Convert-Horses-owner-to-UUID.patch similarity index 94% rename from CraftBukkit-Patches/0143-Convert-Horses-owner-to-UUID.patch rename to CraftBukkit-Patches/0142-Convert-Horses-owner-to-UUID.patch index daadc3b..e4dee29 100644 --- a/CraftBukkit-Patches/0143-Convert-Horses-owner-to-UUID.patch +++ b/CraftBukkit-Patches/0142-Convert-Horses-owner-to-UUID.patch @@ -1,4 +1,4 @@ -From 13fb31ca6e4afa040ee6108db64d8bdf50b88f8d Mon Sep 17 00:00:00 2001 +From e7cf1c84bf12977ad68f5d61e1dfb6e416b729b2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 16 Apr 2014 01:40:30 -0400 Subject: [PATCH] Convert Horses owner to UUID