Merge pull request #771 from electronicboy/master

This commit is contained in:
Zach Brown 2017-07-03 15:42:22 -05:00
commit 5ad5423102
9 changed files with 23 additions and 19 deletions

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Add UnknownCommandEvent
diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java diff --git a/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
new file mode 100644 new file mode 100644
index 00000000..73f99907 index 00000000..19d634c3
--- /dev/null --- /dev/null
+++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java +++ b/src/main/java/org/bukkit/event/command/UnknownCommandEvent.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -70,6 +70,8 @@ index 00000000..73f99907
+ * Sets message that will be returned + * Sets message that will be returned
+ * <p> + * <p>
+ * Set to null to avoid any message being sent + * Set to null to avoid any message being sent
+ *
+ * @param message the message to be returned, or null
+ */ + */
+ public void setMessage(String message) { + public void setMessage(String message) {
+ this.message = message; + this.message = message;

View file

@ -55,7 +55,7 @@ index 30d60247..938959aa 100644
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 6e9fc84f..6f733fe0 100644 index f1e9f200..c6613c0a 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap { @@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java diff --git a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
index c7e9ba6f..3ffc7273 100644 index 1dd50c56..74fc12e9 100644
--- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java --- a/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
+++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
@@ -0,0 +0,0 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable @@ -0,0 +0,0 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable

View file

@ -26,7 +26,7 @@ index 862910e0..c2922a7b 100644
<artifactId>fastutil-lite</artifactId> <artifactId>fastutil-lite</artifactId>
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
new file mode 100644 new file mode 100644
index 00000000..b46a1878 index 00000000..6074ecde
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/profile/LookupProfileEvent.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -41,7 +41,6 @@ index 00000000..b46a1878
+ +
+/** +/**
+ * Allows a plugin to be notified anytime AFTER a Profile has been looked up from the Mojang API + * Allows a plugin to be notified anytime AFTER a Profile has been looked up from the Mojang API
+ *
+ * This is an opportunity to view the response and potentially cache things. + * This is an opportunity to view the response and potentially cache things.
+ * + *
+ * No guarantees are made about thread execution context for this event. If you need to know, check + * No guarantees are made about thread execution context for this event. If you need to know, check
@ -59,7 +58,7 @@ index 00000000..b46a1878
+ } + }
+ +
+ /** + /**
+ * The profile that was recently looked up. This profile can be mutated + * @return The profile that was recently looked up. This profile can be mutated
+ */ + */
+ @Nonnull + @Nonnull
+ public GameProfile getProfile() { + public GameProfile getProfile() {
@ -76,7 +75,7 @@ index 00000000..b46a1878
+} +}
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java diff --git a/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
new file mode 100644 new file mode 100644
index 00000000..16f43b0f index 00000000..750b9334
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java +++ b/src/main/java/com/destroystokyo/paper/event/profile/PreLookupProfileEvent.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@
@ -123,8 +122,7 @@ index 00000000..16f43b0f
+ } + }
+ +
+ /** + /**
+ * Name of the player to look up a profile for + * @return Name of the profile
+ * @return
+ */ + */
+ @Nonnull + @Nonnull
+ public String getName() { + public String getName() {
@ -132,7 +130,7 @@ index 00000000..16f43b0f
+ } + }
+ +
+ /** + /**
+ * The UUID of the profile if it has already been provided by a plugin + * @return The UUID of the profile if it has already been provided by a plugin
+ * + *
+ * If this value is left null by the completion of the event call, then the server will + * If this value is left null by the completion of the event call, then the server will
+ * trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a + * trigger a call to the Mojang API to look up the UUID (Network Request), and subsequently, fire a
@ -147,6 +145,8 @@ index 00000000..16f43b0f
+ * Sets the UUID for this player name. This will skip the initial API call to find the players UUID. + * Sets the UUID for this player name. This will skip the initial API call to find the players UUID.
+ * + *
+ * However, if Profile Properties are needed by the server, you must also set them or else an API call will still be made. + * However, if Profile Properties are needed by the server, you must also set them or else an API call will still be made.
+ *
+ * @param uuid the UUID to set on the {@link GameProfile} or null to reset
+ */ + */
+ public void setUUID(@Nullable UUID uuid) { + public void setUUID(@Nullable UUID uuid) {
+ this.uuid = uuid; + this.uuid = uuid;
@ -154,6 +154,8 @@ index 00000000..16f43b0f
+ +
+ /** + /**
+ * Get the properties for this profile + * Get the properties for this profile
+ *
+ * @return the property map to attach to the new {@link GameProfile}
+ */ + */
+ @Nonnull + @Nonnull
+ public Multimap<String, Property> getProperties() { + public Multimap<String, Property> getProperties() {
@ -162,7 +164,7 @@ index 00000000..16f43b0f
+ +
+ /** + /**
+ * Completely replaces all Properties with the new provided properties + * Completely replaces all Properties with the new provided properties
+ * @param properties + * @param properties the properties to set on the new profile
+ */ + */
+ public void setProperties(Multimap<String, Property> properties) { + public void setProperties(Multimap<String, Property> properties) {
+ this.properties = new PropertyMap(); + this.properties = new PropertyMap();
@ -171,7 +173,7 @@ index 00000000..16f43b0f
+ +
+ /** + /**
+ * Adds additional properties, without removing the original properties + * Adds additional properties, without removing the original properties
+ * @param properties + * @param properties the properties to add to the existing properties
+ */ + */
+ public void addProperties(Multimap<String, Property> properties) { + public void addProperties(Multimap<String, Property> properties) {
+ this.properties.putAll(properties); + this.properties.putAll(properties);
@ -185,7 +187,7 @@ index 00000000..16f43b0f
+ return handlers; + return handlers;
+ } + }
+ +
+ /** + /*
+ * Wraps the Profile Repository so we can intercept all lookups + * Wraps the Profile Repository so we can intercept all lookups
+ */ + */
+ public static GameProfileRepository wrapProfileRepository(final GameProfileRepository orig) { + public static GameProfileRepository wrapProfileRepository(final GameProfileRepository orig) {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Access items by EquipmentSlot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
index 67c54899..3f58c34e 100644 index 67c54899d..3f58c34e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
@@ -0,0 +0,0 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i @@ -0,0 +0,0 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i

View file

@ -13,7 +13,7 @@ This of course is undesirable, so just return the loaded side as "primary"
and treat it as a single chest if the other sides are unloaded and treat it as a single chest if the other sides are unloaded
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index bc398ec5..90267a1f 100644 index bc398ec52..90267a1fb 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java --- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java +++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity { @@ -0,0 +0,0 @@ public class BlockChest extends BlockTileEntity {

View file

@ -7,7 +7,7 @@ Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed. Potentially an old CB change that's no longer needed.
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 8aba80c0..9bd55e6a 100644 index 8aba80c07..9bd55e6a4 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
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Ensure Chunks never ever load async
Safely pushes the operation to main thread, then back to the posting thread Safely pushes the operation to main thread, then back to the posting thread
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
index 7b7a3d01..9aaca21a 100644 index 7b7a3d01b..9aaca21a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
@@ -0,0 +0,0 @@ import com.destroystokyo.paper.PaperConfig; @@ -0,0 +0,0 @@ import com.destroystokyo.paper.PaperConfig;
@ -27,7 +27,7 @@ index 7b7a3d01..9aaca21a 100644
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) { public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index b5efb9c3..ef9529ad 100644 index b5efb9c3f..ef9529add 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -0,0 +0,0 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu @@ -0,0 +0,0 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created. Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
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 f26a438a..8aba80c0 100644 index f26a438af..8aba80c07 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
@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { @@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener {