Fix NPE when getting location from players EnderChest (fixes #1041)

This commit is contained in:
Shane Freeder
2018-03-10 13:07:40 +00:00
parent 12012ab589
commit 3af34bfe45
9 changed files with 94 additions and 77 deletions

View File

@@ -6,13 +6,14 @@ Subject: [PATCH] Add MetadataStoreBase.removeAll(Plugin)
So that on reload, metadata will be cleared
diff --git a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 64c0f0a7..6da6abd8 100644
--- a/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
+++ b/src/main/java/org/bukkit/metadata/MetadataStoreBase.java
@@ -0,0 +0,0 @@ public abstract class MetadataStoreBase<T> {
}
}
/**
+ /**
+ * Removes all metadata in the metadata store that originates from the
+ * given plugin.
+ *
@@ -32,8 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ }
+
+ /**
/**
* Creates a unique name for the object receiving metadata by combining
* unique data from the subject with a metadataKey.
* <p>
--

View File

@@ -5,13 +5,14 @@ Subject: [PATCH] Add async chunk load API
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 9b6eb48f..561ef0e1 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -0,0 +0,0 @@ public interface World extends PluginMessageRecipient, Metadatable {
*/
public Chunk getChunkAt(Block block);
/**
+ /**
+ * Used by {@link World#getChunkAtAsync(Location,ChunkLoadCallback)} methods
+ * to request a {@link Chunk} to be loaded, with this callback receiving
+ * the chunk when it is finished.
@@ -83,8 +84,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
+
+ /**
/**
* Checks if the specified {@link Chunk} is loaded
*
* @param chunk The chunk to check
--

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index f37491d7..30882559 100644
--- a/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java
@@ -0,0 +0,0 @@
@@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
exp = expAmount;
}
/**
+ /**
+ * Get the source that provided the experience.
+ *
+ * @return The source of the experience
@@ -48,8 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
+
+ /**
/**
* Get the amount of experience the player will receive
*
* @return The amount of experience
--

View File

@@ -5,13 +5,14 @@ Subject: [PATCH] add Trove and FastUtil to Bukkit
diff --git a/pom.xml b/pom.xml
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
index 4220760f..623d9eae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -0,0 +0,0 @@
</repositories>
<dependencies>
<dependency>
+ <dependency>
+ <groupId>net.sf.trove4j</groupId>
+ <artifactId>trove4j</artifactId>
+ <version>3.0.3</version>
@@ -24,8 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
--