Upstream merge + remove 3 pulled patches.

This commit is contained in:
md_5 2013-09-12 10:17:46 +10:00
parent f4367af8f5
commit 1b854cbe28
28 changed files with 42 additions and 231 deletions

2
Bukkit

@ -1 +1 @@
Subproject commit 1f83111208ab3612f384a2e6b65cc28423dc625e Subproject commit 30a9411199af1fddf0e26c2181fa8f37b980a128

View File

@ -1,11 +1,11 @@
From af02a7e6f7a94b882fc13435e78e9f2eca684060 Mon Sep 17 00:00:00 2001 From 4563fe77bd20047b474f591af71f2f91ccd9b2b3 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sun, 2 Jun 2013 10:36:24 +1000 Date: Sun, 2 Jun 2013 10:36:24 +1000
Subject: [PATCH] POM Changes Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index fbdc3c3..34c13e9 100644 index 4209f2a..37ef0ef 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -1,43 +1,23 @@ @@ -1,43 +1,23 @@
@ -23,7 +23,7 @@ index fbdc3c3..34c13e9 100644
+ +
+ <groupId>org.spigotmc</groupId> + <groupId>org.spigotmc</groupId>
+ <artifactId>spigot-api</artifactId> + <artifactId>spigot-api</artifactId>
<version>1.6.2-R0.2-SNAPSHOT</version> <version>1.6.2-R1.1-SNAPSHOT</version>
- <name>Bukkit</name> - <name>Bukkit</name>
- <url>http://www.bukkit.org</url> - <url>http://www.bukkit.org</url>
+ <name>Spigot-API</name> + <name>Spigot-API</name>

View File

@ -1,78 +0,0 @@
From f9a4d23f040aa2b30d09b6e563fb90a87c85731a Mon Sep 17 00:00:00 2001
From: Phillip Schichtel <quick_wango@code-infection.de>
Date: Mon, 29 Apr 2013 23:07:42 +0200
Subject: [PATCH] Console Command Completion
Implement command tab completion in the console. Adds BUKKIT-4168
To accomplish this 2 changes to Bukkit were required:
- the player check in Command.tabComplete() had to be removed
- the SimpleCommandMap prepends the / only for players
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 5416c71..2f189ca 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -78,18 +78,13 @@ public abstract class Command {
Validate.notNull(args, "Arguments cannot be null");
Validate.notNull(alias, "Alias cannot be null");
- if (!(sender instanceof Player) || args.length == 0) {
- return ImmutableList.of();
- }
-
String lastWord = args[args.length - 1];
- Player senderPlayer = (Player) sender;
-
ArrayList<String> matchedPlayers = new ArrayList<String>();
+ final boolean noPlayer = !(sender instanceof Player);
for (Player player : sender.getServer().getOnlinePlayers()) {
String name = player.getName();
- if (senderPlayer.canSee(player) && StringUtil.startsWithIgnoreCase(name, lastWord)) {
+ if (noPlayer || ((Player) sender).canSee(player) && StringUtil.startsWithIgnoreCase(name, lastWord)) {
matchedPlayers.add(name);
}
}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index f567dc0..f716782 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -16,6 +16,7 @@ import java.util.regex.Pattern;
import org.apache.commons.lang.Validate;
import org.bukkit.Server;
import org.bukkit.command.defaults.*;
+import org.bukkit.entity.Player;
import org.bukkit.util.StringUtil;
public class SimpleCommandMap implements CommandMap {
@@ -226,6 +227,8 @@ public class SimpleCommandMap implements CommandMap {
ArrayList<String> completions = new ArrayList<String>();
Map<String, Command> knownCommands = this.knownCommands;
+ final String prefix = (sender instanceof Player ? "/" : "");
+
for (VanillaCommand command : fallbackCommands) {
String name = command.getName();
@@ -241,7 +244,7 @@ public class SimpleCommandMap implements CommandMap {
continue;
}
- completions.add('/' + name);
+ completions.add(prefix + name);
}
for (Map.Entry<String, Command> commandEntry : knownCommands.entrySet()) {
@@ -254,7 +257,7 @@ public class SimpleCommandMap implements CommandMap {
String name = commandEntry.getKey(); // Use the alias, not command name
if (StringUtil.startsWithIgnoreCase(name, cmdLine)) {
- completions.add('/' + name);
+ completions.add(prefix + name);
}
}
--
1.8.1.2

View File

@ -1,4 +1,4 @@
From 325d5e9fcec324f6d39425a4dede2a6b1eb1d793 Mon Sep 17 00:00:00 2001 From 17fc2456d07aaeff2099321de056e6a61e18462c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 7 Jul 2013 10:32:05 -0400 Date: Sun, 7 Jul 2013 10:32:05 -0400
Subject: [PATCH] InventoryClickEvent getClickedInventory Subject: [PATCH] InventoryClickEvent getClickedInventory

View File

@ -1,4 +1,4 @@
From 1f0602e700904904b1d77ec02b066f955dcf6ea0 Mon Sep 17 00:00:00 2001 From 5d672b1aa92376a8e13540221f774f14ff96b2d7 Mon Sep 17 00:00:00 2001
From: Alex Bennett <alex.eugene.bennett@gmail.com> From: Alex Bennett <alex.eugene.bennett@gmail.com>
Date: Thu, 11 Jul 2013 15:31:32 -0500 Date: Thu, 11 Jul 2013 15:31:32 -0500
Subject: [PATCH] Added getAllSessionData() to the Conversation API. Subject: [PATCH] Added getAllSessionData() to the Conversation API.

View File

@ -1,4 +1,4 @@
From fb52162279c4bf3d6c38cf9f731e60addeffb073 Mon Sep 17 00:00:00 2001 From 8c044d475e5ebdf5ad41667d3db04a03cf4dc33f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Mon, 22 Jul 2013 19:09:43 +1000 Date: Mon, 22 Jul 2013 19:09:43 +1000
Subject: [PATCH] Catch Conversation API Errors Subject: [PATCH] Catch Conversation API Errors

View File

@ -1,4 +1,4 @@
From c5cfcb06166b8f6a1e410bfc19340fdd8e641019 Mon Sep 17 00:00:00 2001 From 64dc76e6adadefc5072c492ca1ebd81e88fa95a9 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:20:50 +1000 Date: Sat, 3 Aug 2013 19:20:50 +1000
Subject: [PATCH] Player Collision API Subject: [PATCH] Player Collision API

View File

@ -1,11 +1,11 @@
From eff7918f5154d1394004f40e5f3a74f99793a177 Mon Sep 17 00:00:00 2001 From f8a6577edc2c37aa3bc8cffd9fbf29491488bade Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:42:16 +1000 Date: Sat, 3 Aug 2013 19:42:16 +1000
Subject: [PATCH] Expand Boolean Prompt Values Subject: [PATCH] Expand Boolean Prompt Values
diff --git a/src/main/java/org/bukkit/conversations/BooleanPrompt.java b/src/main/java/org/bukkit/conversations/BooleanPrompt.java diff --git a/src/main/java/org/bukkit/conversations/BooleanPrompt.java b/src/main/java/org/bukkit/conversations/BooleanPrompt.java
index 3bfd733..cd29a0c 100644 index 6abb354..a51e754 100644
--- a/src/main/java/org/bukkit/conversations/BooleanPrompt.java --- a/src/main/java/org/bukkit/conversations/BooleanPrompt.java
+++ b/src/main/java/org/bukkit/conversations/BooleanPrompt.java +++ b/src/main/java/org/bukkit/conversations/BooleanPrompt.java
@@ -14,12 +14,13 @@ public abstract class BooleanPrompt extends ValidatingPrompt{ @@ -14,12 +14,13 @@ public abstract class BooleanPrompt extends ValidatingPrompt{

View File

@ -1,4 +1,4 @@
From f71dbed41b95b2db2780fc240a9788736f6e19ab Mon Sep 17 00:00:00 2001 From 2b0c15a4f33f6f6f08f59c0245675a45a83ac572 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:49:36 +1000 Date: Sat, 3 Aug 2013 19:49:36 +1000
Subject: [PATCH] Add Getter for Entity Invulnerability Subject: [PATCH] Add Getter for Entity Invulnerability

@ -1 +1 @@
Subproject commit fdc56564e248dc0797696c8f6463c2ffda781035 Subproject commit 22f47a805a23edd6aa202aa78a85149bf1dfcc99

View File

@ -1,11 +1,11 @@
From f286b76dd6551fc08ca2f1a0a83e3498f2454cd9 Mon Sep 17 00:00:00 2001 From 798b905a01eca318b3579cd5127edc42cce24c26 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:07:39 +1000 Date: Tue, 2 Jul 2013 13:07:39 +1000
Subject: [PATCH] POM Changes Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml diff --git a/pom.xml b/pom.xml
index a46ecbd..0e6c422 100644 index f23621d..825c821 100644
--- a/pom.xml --- a/pom.xml
+++ b/pom.xml +++ b/pom.xml
@@ -1,12 +1,20 @@ @@ -1,12 +1,20 @@
@ -25,7 +25,7 @@ index a46ecbd..0e6c422 100644
+ <groupId>org.spigotmc</groupId> + <groupId>org.spigotmc</groupId>
+ <artifactId>spigot</artifactId> + <artifactId>spigot</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.6.2-R0.2-SNAPSHOT</version> <version>1.6.2-R1.1-SNAPSHOT</version>
- <name>CraftBukkit</name> - <name>CraftBukkit</name>
- <url>http://www.bukkit.org</url> - <url>http://www.bukkit.org</url>
+ <name>Spigot</name> + <name>Spigot</name>

View File

@ -1,4 +1,4 @@
From 1c934e1c78a8d17c3517bbcf230dc728aeeefe88 Mon Sep 17 00:00:00 2001 From ba5620ccf386fd94ddce7fe2158550ece485f03a Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 23 Mar 2013 11:15:11 +1100 Date: Sat, 23 Mar 2013 11:15:11 +1100
Subject: [PATCH] BungeeCord Support Subject: [PATCH] BungeeCord Support
@ -28,10 +28,10 @@ index 7f2c1a9..5593b62 100644
+ // Spigot end + // Spigot end
} }
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 0f17c90..388acf9 100644 index 5dafeaf..a85fc5b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -295,7 +295,7 @@ public abstract class PlayerList { @@ -296,7 +296,7 @@ public abstract class PlayerList {
// depending on the outcome. // depending on the outcome.
EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(0), s, this.server.O() ? new DemoPlayerInteractManager(this.server.getWorldServer(0)) : new PlayerInteractManager(this.server.getWorldServer(0))); EntityPlayer entity = new EntityPlayer(this.server, this.server.getWorldServer(0), s, this.server.O() ? new DemoPlayerInteractManager(this.server.getWorldServer(0)) : new PlayerInteractManager(this.server.getWorldServer(0)));
Player player = entity.getBukkitEntity(); Player player = entity.getBukkitEntity();

View File

@ -1,4 +1,4 @@
From 0a8a33e98273e97eed1086de950036935d1cd42a Mon Sep 17 00:00:00 2001 From c46ce6480300baa0776e9783f66f5dfdd027cadf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 24 Feb 2013 20:45:20 +1100 Date: Sun, 24 Feb 2013 20:45:20 +1100
Subject: [PATCH] Enable Improved Ping Sending Subject: [PATCH] Enable Improved Ping Sending
@ -17,10 +17,10 @@ index 58e5217..f9ac1e1 100644
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) { public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 388acf9..b7b1c45 100644 index a85fc5b..20b9c5d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -719,6 +719,25 @@ public abstract class PlayerList { @@ -720,6 +720,25 @@ public abstract class PlayerList {
this.sendAll(new Packet201PlayerInfo(entityplayer.getName(), true, entityplayer.ping)); this.sendAll(new Packet201PlayerInfo(entityplayer.getName(), true, entityplayer.ping));
} }
// CraftBukkit end */ // CraftBukkit end */

View File

@ -1,4 +1,4 @@
From fb7a0b89a5948ad072b6b47c7cfbf24d58290fe2 Mon Sep 17 00:00:00 2001 From 0dc0c332b02bfa4d76bc029e89a6c59f28b13198 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Tue, 11 Jun 2013 11:54:32 +1000 Date: Tue, 11 Jun 2013 11:54:32 +1000
Subject: [PATCH] Prevent Shutdown Hang Subject: [PATCH] Prevent Shutdown Hang
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Shutdown Hang
Prevents server hanging if players disconnect during the shutdown sequence. Prevents server hanging if players disconnect during the shutdown sequence.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f0bc5c4..16df7ae 100644 index 20b9c5d..a85157b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1063,7 +1063,14 @@ public abstract class PlayerList { @@ -1064,7 +1064,14 @@ public abstract class PlayerList {
public void r() { public void r() {
while (!this.players.isEmpty()) { while (!this.players.isEmpty()) {

View File

@ -1,4 +1,4 @@
From e87093815494e4ca3a4c9d1f7f85bc918a60b278 Mon Sep 17 00:00:00 2001 From bd3a9ccfa048c4e5f99c2add256cdca7789a5a07 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 19:21:58 +1000 Date: Fri, 21 Jun 2013 19:21:58 +1000
Subject: [PATCH] Configurable Messages Subject: [PATCH] Configurable Messages
@ -21,10 +21,10 @@ index 5e9dad2..9deb9d1 100644
} else { } else {
this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-"; this.loginKey = this.server.getOnlineMode() ? Long.toString(random.nextLong(), 16) : "-";
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 38e0c5b..262682d 100644 index a85157b..e5a259d 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -309,7 +309,7 @@ public abstract class PlayerList { @@ -310,7 +310,7 @@ public abstract class PlayerList {
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1); event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s1);
} else if (!this.isWhitelisted(s)) { } else if (!this.isWhitelisted(s)) {
@ -33,7 +33,7 @@ index 38e0c5b..262682d 100644
} else { } else {
String s2 = socketaddress.toString(); String s2 = socketaddress.toString();
@@ -325,7 +325,7 @@ public abstract class PlayerList { @@ -326,7 +326,7 @@ public abstract class PlayerList {
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s3); event.disallow(PlayerLoginEvent.Result.KICK_BANNED, s3);
} else if (this.players.size() >= this.maxPlayers) { } else if (this.players.size() >= this.maxPlayers) {

View File

@ -1,11 +1,11 @@
From f7d44988922838f78b93465580dc27ec4e8067bb Mon Sep 17 00:00:00 2001 From b77192c2e8533c8be00f0beeb661b62849c35110 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 20:32:49 +1000 Date: Tue, 2 Jul 2013 20:32:49 +1000
Subject: [PATCH] Entity Mount and Dismount Events Subject: [PATCH] Entity Mount and Dismount Events
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9c737ec..ee1ce90 100644 index fe856fc..60c2221 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1427,6 +1427,7 @@ public abstract class Entity { @@ -1427,6 +1427,7 @@ public abstract class Entity {

View File

@ -1,22 +0,0 @@
From d28b69277fa9bed23920302ea95067c175e5e11f Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 13:51:38 +1000
Subject: [PATCH] Silence End of Stream Errors
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
index 391c6fc..b5e0261 100644
--- a/src/main/java/net/minecraft/server/Packet.java
+++ b/src/main/java/net/minecraft/server/Packet.java
@@ -112,7 +112,7 @@ public abstract class Packet {
++o;
p += (long) packet.a();
} catch (EOFException eofexception) {
- iconsolelogmanager.severe("Reached end of stream for " + socket.getInetAddress());
+ // iconsolelogmanager.severe("Reached end of stream for " + socket.getInetAddress()); // Spigot - too spammy
return null;
}
--
1.8.1.2

View File

@ -1,4 +1,4 @@
From b27b1cb7d8b50442631a95271b364bc41e38a0c0 Mon Sep 17 00:00:00 2001 From 33ca90c41ee7904b893c767d1ea6e66f55c83778 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Thu, 4 Jul 2013 10:11:46 +1000 Date: Thu, 4 Jul 2013 10:11:46 +1000
Subject: [PATCH] Colour Console Messages Subject: [PATCH] Colour Console Messages

View File

@ -1,4 +1,4 @@
From 3e68f19219ef911b0c48d121fabe3bf34f4d8a02 Mon Sep 17 00:00:00 2001 From 43da205a1bc25ac30b44a6367b7d7f35ebe90818 Mon Sep 17 00:00:00 2001
From: Alex Ciuba <alexciuba@gmail.com> From: Alex Ciuba <alexciuba@gmail.com>
Date: Mon, 10 Jun 2013 16:04:38 -0400 Date: Mon, 10 Jun 2013 16:04:38 -0400
Subject: [PATCH] Properly Consume Bonemeal in Dispensers Subject: [PATCH] Properly Consume Bonemeal in Dispensers

View File

@ -1,4 +1,4 @@
From 20c689599b300747b7b102d0ef48e917b3e6ffdb Mon Sep 17 00:00:00 2001 From 3d38cee38e3984d42237d7353b000051be2be0c6 Mon Sep 17 00:00:00 2001
From: Alex Ciuba <alexciuba@gmail.com> From: Alex Ciuba <alexciuba@gmail.com>
Date: Tue, 11 Jun 2013 15:23:03 -0400 Date: Tue, 11 Jun 2013 15:23:03 -0400
Subject: [PATCH] Prevent Ghost Players Caused by Plugins Subject: [PATCH] Prevent Ghost Players Caused by Plugins
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Ghost Players Caused by Plugins
Check if the player is still connected after firing event. Fixes BUKKIT-4327 Check if the player is still connected after firing event. Fixes BUKKIT-4327
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 79c3b98..971cfa5 100644 index e5a259d..bb13b41 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java --- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -422,6 +422,9 @@ public abstract class PlayerList { @@ -423,6 +423,9 @@ public abstract class PlayerList {
Player respawnPlayer = this.cserver.getPlayer(entityplayer1); Player respawnPlayer = this.cserver.getPlayer(entityplayer1);
PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn); PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
this.cserver.getPluginManager().callEvent(respawnEvent); this.cserver.getPluginManager().callEvent(respawnEvent);

View File

@ -1,4 +1,4 @@
From 26354fbb3ff5283b869fb241c465d508539f8b6c Mon Sep 17 00:00:00 2001 From ea70179245470f2baf92f73a45c87e36e654edbc Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com> From: Ammar Askar <ammar@ammaraskar.com>
Date: Tue, 16 Jul 2013 03:32:32 +0500 Date: Tue, 16 Jul 2013 03:32:32 +0500
Subject: [PATCH] Entity ticking chunk caching Subject: [PATCH] Entity ticking chunk caching

View File

@ -1,89 +0,0 @@
From f0b905b9c4e67f0594a46c19bcab3f9d70984fcb Mon Sep 17 00:00:00 2001
From: Phillip Schichtel <quick_wango@code-infection.de>
Date: Fri, 5 Jul 2013 21:55:00 +1000
Subject: [PATCH] Console Command Completion
changed exception handling
wrapped the tab completion in a waitable to sync it with the main thread
Implement command tab completion in the console. Adds BUKKIT-4168
Even though JLine provides an API for tab completion, there was still now tab
completion for console commands.
This commit implements tab completion in the console by providing the
ConsoleReader with a Completer implementation.
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index c4fc9d0..de4a430 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -17,6 +17,7 @@ import java.util.Map.Entry;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.craftbukkit.chunkio.ChunkIOExecutor;
+import org.bukkit.craftbukkit.command.ConsoleCommandCompleter;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -55,6 +56,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer minecraftserver) {
minecraftserver.server = new CraftServer(minecraftserver, this);
minecraftserver.console = org.bukkit.craftbukkit.command.ColouredConsoleSender.getInstance();
+ minecraftserver.reader.addCompleter(new ConsoleCommandCompleter(minecraftserver.server));
this.cserver = minecraftserver.server;
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
new file mode 100644
index 0000000..a889ff3
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -0,0 +1,46 @@
+package org.bukkit.craftbukkit.command;
+
+import jline.console.completer.Completer;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.craftbukkit.util.Waitable;
+
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.logging.Level;
+
+public class ConsoleCommandCompleter implements Completer {
+ private final CraftServer server;
+
+ public ConsoleCommandCompleter(CraftServer server) {
+ this.server = server;
+ }
+
+ public int complete(final String buffer, final int cursor, final List<CharSequence> candidates) {
+ Waitable<List<String>> waitable = new Waitable<List<String>>() {
+ @Override
+ protected List<String> evaluate() {
+ return server.getCommandMap().tabComplete(server.getConsoleSender(), buffer);
+ }
+ };
+ this.server.getServer().processQueue.add(waitable);
+ try {
+ List<String> offers = waitable.get();
+ if (offers == null) {
+ return cursor;
+ }
+ candidates.addAll(offers);
+
+ final int lastSpace = buffer.lastIndexOf(' ');
+ if (lastSpace == -1) {
+ return cursor - buffer.length();
+ } else {
+ return cursor - (buffer.length() - lastSpace - 1);
+ }
+ } catch (ExecutionException e) {
+ this.server.getLogger().log(Level.WARNING, "Unhandled exception when tab completing", e);
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
+ return cursor;
+ }
+}
--
1.8.1.2

View File

@ -1,4 +1,4 @@
From 54c3ceea8ea9090db66f89766911761c7b403c17 Mon Sep 17 00:00:00 2001 From e5bd78ed743866ec5f4f420dd52958e0f282c92e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:02:59 +1000 Date: Sat, 3 Aug 2013 19:02:59 +1000
Subject: [PATCH] Plug World Unload Memory Leak Subject: [PATCH] Plug World Unload Memory Leak

View File

@ -1,4 +1,4 @@
From 1d4628a69a0585ad73dda98159ccbe810a9a0da5 Mon Sep 17 00:00:00 2001 From a9a560dff16cb6e448c85a9f664bab13a424e463 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Sat, 3 Aug 2013 19:27:07 +1000 Date: Sat, 3 Aug 2013 19:27:07 +1000
Subject: [PATCH] Player Collision API Subject: [PATCH] Player Collision API

View File

@ -1,4 +1,4 @@
From 576ae6ea5b3348156429e5a72987eaf6184be3df Mon Sep 17 00:00:00 2001 From 327957a56aa86e4278af0f73d85ad1e6d225ecbf Mon Sep 17 00:00:00 2001
From: agentk20 <agentkid20@gmail.com> From: agentk20 <agentkid20@gmail.com>
Date: Sat, 3 Aug 2013 19:28:48 +1000 Date: Sat, 3 Aug 2013 19:28:48 +1000
Subject: [PATCH] Fully Disable Snooper When Not Required Subject: [PATCH] Fully Disable Snooper When Not Required

View File

@ -1,4 +1,4 @@
From b587388cf6df919971622d6b67d78f7750928231 Mon Sep 17 00:00:00 2001 From 8a9ef0403468ad7597e4b0e70ae3a61a18bf88b0 Mon Sep 17 00:00:00 2001
From: DerFlash <bte@freenet.de> From: DerFlash <bte@freenet.de>
Date: Sat, 3 Aug 2013 19:53:48 +1000 Date: Sat, 3 Aug 2013 19:53:48 +1000
Subject: [PATCH] Add Getter for Entity Invulnerability Subject: [PATCH] Add Getter for Entity Invulnerability

View File

@ -1,4 +1,4 @@
From c3d0cccd2b134602ccc7b99039b308efa4c360ee Mon Sep 17 00:00:00 2001 From 284f5650477cb3ccaedd228fbaa6439e8a8e8bd9 Mon Sep 17 00:00:00 2001
From: Ammar Askar <ammar@ammaraskar.com> From: Ammar Askar <ammar@ammaraskar.com>
Date: Sat, 3 Aug 2013 21:42:00 +0500 Date: Sat, 3 Aug 2013 21:42:00 +0500
Subject: [PATCH] Guard entity list Subject: [PATCH] Guard entity list

View File

@ -1,4 +1,4 @@
From 20ef1354a9a56fd07cfbd6285273acaf7d1edfa2 Mon Sep 17 00:00:00 2001 From d11fddbdd62a2be3e66fc9623661403ffcd17faf Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Mon, 5 Aug 2013 20:17:20 +1000 Date: Mon, 5 Aug 2013 20:17:20 +1000
Subject: [PATCH] Cap Minimum Player Speed Subject: [PATCH] Cap Minimum Player Speed