mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Cleanup javadoc warnings
This commit is contained in:
parent
609d6bba6a
commit
69928187c9
20 changed files with 203 additions and 62 deletions
|
@ -10,7 +10,7 @@ of giving the player experience points.
|
|||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 23cc8b5e..a882323d 100644
|
||||
index 23cc8b5e9..aa218f497 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
|
@ -40,8 +40,8 @@ index 23cc8b5e..a882323d 100644
|
|||
+ *
|
||||
+ * Can also be called with {@link #giveExp(int, boolean)} by passing true to applyMending
|
||||
+ *
|
||||
+ * @param amount
|
||||
+ * @return
|
||||
+ * @param amount Exp to apply
|
||||
+ * @return the remaining experience
|
||||
+ */
|
||||
+ public int applyMending(int amount);
|
||||
+ // Paper end
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add EntityKnockbackByEntityEvent
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..99f7ef70
|
||||
index 000000000..f6ef11624
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityKnockbackByEntityEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -57,22 +57,31 @@ index 00000000..99f7ef70
|
|||
+ cancelled = cancel;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return the entity which was knocked back
|
||||
+ */
|
||||
+ @Override
|
||||
+ public LivingEntity getEntity() {
|
||||
+ return (LivingEntity) super.getEntity();
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the original knockback strength.
|
||||
+ * @return the original knockback strength.
|
||||
+ */
|
||||
+ public float getKnockbackStrength() {
|
||||
+ return knockbackStrength;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return the Entity which hit
|
||||
+ */
|
||||
+ public Entity getHitBy() {
|
||||
+ return hitBy;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * @return the acceleration that will be applied
|
||||
+ */
|
||||
+ public Vector getAcceleration() {
|
||||
+ return acceleration;
|
||||
+ }
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 4ed7d2dc..4441a8e0 100644
|
||||
index c9c1a4352..20cc4e121 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 {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add "getNearbyXXX" methods to Location
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 916238c4..c1689168 100644
|
||||
index 916238c4d..162a76e8b 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
|
@ -49,6 +49,7 @@ index 916238c4..c1689168 100644
|
|||
+ /**
|
||||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param radius X Radius
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double radius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, radius, radius, radius);
|
||||
|
@ -58,6 +59,7 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, xzRadius, yRadius, xzRadius);
|
||||
|
@ -68,6 +70,7 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z radius
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, xRadius, yRadius, zRadius);
|
||||
|
@ -75,7 +78,9 @@ index 916238c4..c1689168 100644
|
|||
+
|
||||
+ /**
|
||||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param radius X Radius
|
||||
+ * @param radius Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double radius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, radius, radius, radius, predicate);
|
||||
|
@ -85,6 +90,8 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double xzRadius, double yRadius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, xzRadius, yRadius, xzRadius, predicate);
|
||||
|
@ -95,6 +102,8 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<LivingEntity> getNearbyLivingEntities(double xRadius, double yRadius, double zRadius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, xRadius, yRadius, zRadius, predicate);
|
||||
|
@ -103,7 +112,9 @@ index 916238c4..c1689168 100644
|
|||
+ /**
|
||||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param radius X/Y/Z Radius
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+
|
||||
+ public Collection<Player> getNearbyPlayers(double radius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, radius, radius, radius);
|
||||
+ }
|
||||
|
@ -112,6 +123,7 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<Player> getNearbyPlayers(double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, xzRadius, yRadius, xzRadius);
|
||||
|
@ -122,6 +134,7 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<Player> getNearbyPlayers(double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, xRadius, yRadius, zRadius);
|
||||
|
@ -130,6 +143,8 @@ index 916238c4..c1689168 100644
|
|||
+ /**
|
||||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param radius X/Y/Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<Player> getNearbyPlayers(double radius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, radius, radius, radius, predicate);
|
||||
|
@ -139,6 +154,8 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<Player> getNearbyPlayers(double xzRadius, double yRadius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, xzRadius, yRadius, xzRadius, predicate);
|
||||
|
@ -149,6 +166,8 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public Collection<Player> getNearbyPlayers(double xRadius, double yRadius, double zRadius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, xRadius, yRadius, zRadius, predicate);
|
||||
|
@ -158,6 +177,8 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
||||
+ * @param clazz Type to filter by
|
||||
+ * @param radius X/Y/Z radius to search within
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities of type clazz near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, double radius) {
|
||||
+ return getNearbyEntitiesByType(clazz, radius, radius, radius, null);
|
||||
|
@ -168,6 +189,8 @@ index 916238c4..c1689168 100644
|
|||
+ * @param clazz Type to filter by
|
||||
+ * @param xzRadius X/Z radius to search within
|
||||
+ * @param yRadius Y radius to search within
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(clazz, xzRadius, yRadius, xzRadius, null);
|
||||
|
@ -179,6 +202,8 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(clazz, xRadius, yRadius, zRadius, null);
|
||||
|
@ -188,6 +213,9 @@ index 916238c4..c1689168 100644
|
|||
+ * Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
||||
+ * @param clazz Type to filter by
|
||||
+ * @param radius X/Y/Z radius to search within
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, double radius, Predicate<T> predicate) {
|
||||
+ return getNearbyEntitiesByType(clazz, radius, radius, radius, predicate);
|
||||
|
@ -198,6 +226,9 @@ index 916238c4..c1689168 100644
|
|||
+ * @param clazz Type to filter by
|
||||
+ * @param xzRadius X/Z radius to search within
|
||||
+ * @param yRadius Y radius to search within
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, double xzRadius, double yRadius, Predicate<T> predicate) {
|
||||
+ return getNearbyEntitiesByType(clazz, xzRadius, yRadius, xzRadius, predicate);
|
||||
|
@ -209,6 +240,9 @@ index 916238c4..c1689168 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends Entity> clazz, double xRadius, double yRadius, double zRadius, Predicate<T> predicate) {
|
||||
+ if (world == null) {
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
|||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 0bc47dd6..3b81f81e 100644
|
||||
index 0bc47dd6e..8d29ede0a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit;
|
||||
|
@ -32,7 +32,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ /**
|
||||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X Radius
|
||||
+ * @param radius Radius
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double radius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, radius, radius, radius);
|
||||
|
@ -43,6 +44,7 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, xzRadius, yRadius, xzRadius);
|
||||
|
@ -54,6 +56,7 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z radius
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, xRadius, yRadius, zRadius);
|
||||
|
@ -63,6 +66,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double radius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, radius, radius, radius, predicate);
|
||||
|
@ -73,6 +78,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double xzRadius, double yRadius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, xzRadius, yRadius, xzRadius, predicate);
|
||||
|
@ -84,6 +91,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<LivingEntity> getNearbyLivingEntities(Location loc, double xRadius, double yRadius, double zRadius, Predicate<LivingEntity> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.LivingEntity.class, loc, xRadius, yRadius, zRadius, predicate);
|
||||
|
@ -93,6 +102,7 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X/Y/Z Radius
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double radius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, radius, radius, radius);
|
||||
|
@ -103,6 +113,7 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @return the collection of living entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, xzRadius, yRadius, xzRadius);
|
||||
|
@ -114,6 +125,7 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, xRadius, yRadius, zRadius);
|
||||
|
@ -123,6 +135,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * Gets nearby players within the specified radius (bounding box)
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X/Y/Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double radius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, radius, radius, radius, predicate);
|
||||
|
@ -133,6 +147,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double xzRadius, double yRadius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, xzRadius, yRadius, xzRadius, predicate);
|
||||
|
@ -144,6 +160,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @return the collection of players near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default Collection<Player> getNearbyPlayers(Location loc, double xRadius, double yRadius, double zRadius, Predicate<Player> predicate) {
|
||||
+ return getNearbyEntitiesByType(org.bukkit.entity.Player.class, loc, xRadius, yRadius, zRadius, predicate);
|
||||
|
@ -154,6 +172,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param clazz Type to filter by
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X/Y/Z radius to search within
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, Location loc, double radius) {
|
||||
+ return getNearbyEntitiesByType(clazz, loc, radius, radius, radius, null);
|
||||
|
@ -165,6 +185,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z radius to search within
|
||||
+ * @param yRadius Y radius to search within
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, Location loc, double xzRadius, double yRadius) {
|
||||
+ return getNearbyEntitiesByType(clazz, loc, xzRadius, yRadius, xzRadius, null);
|
||||
|
@ -177,6 +199,8 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, Location loc, double xRadius, double yRadius, double zRadius) {
|
||||
+ return getNearbyEntitiesByType(clazz, loc, xRadius, yRadius, zRadius, null);
|
||||
|
@ -187,6 +211,9 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param clazz Type to filter by
|
||||
+ * @param loc Center location
|
||||
+ * @param radius X/Y/Z radius to search within
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, Location loc, double radius, Predicate<T> predicate) {
|
||||
+ return getNearbyEntitiesByType(clazz, loc, radius, radius, radius, predicate);
|
||||
|
@ -198,19 +225,25 @@ index 0bc47dd6..3b81f81e 100644
|
|||
+ * @param loc Center location
|
||||
+ * @param xzRadius X/Z radius to search within
|
||||
+ * @param yRadius Y radius to search within
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends T> clazz, Location loc, double xzRadius, double yRadius, Predicate<T> predicate) {
|
||||
+ return getNearbyEntitiesByType(clazz, loc, xzRadius, yRadius, xzRadius, predicate);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
||||
+ * @param clazz Type to filter by
|
||||
+ * @param loc Center location
|
||||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ */
|
||||
+ * Gets all nearby entities of the specified type, within the specified radius (bounding box)
|
||||
+ * @param clazz Type to filter by
|
||||
+ * @param loc Center location
|
||||
+ * @param xRadius X Radius
|
||||
+ * @param yRadius Y Radius
|
||||
+ * @param zRadius Z Radius
|
||||
+ * @param predicate a predicate used to filter results
|
||||
+ * @param <T> the entity type
|
||||
+ * @return the collection of entities near location. This will always be a non-null collection.
|
||||
+ */
|
||||
+ public default <T extends Entity> Collection<T> getNearbyEntitiesByType(Class<? extends Entity> clazz, Location loc, double xRadius, double yRadius, double zRadius, Predicate<T> predicate) {
|
||||
+ if (clazz == null) {
|
||||
+ clazz = Entity.class;
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Allow Changing of Player Sample in ServerListPingEvent
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
index 3c38d857..cb8d0fcd 100644
|
||||
index 3c38d8573..a293bc212 100644
|
||||
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
@@ -0,0 +0,0 @@ package org.bukkit.event.server;
|
||||
|
@ -26,6 +26,7 @@ index 3c38d857..cb8d0fcd 100644
|
|||
+
|
||||
+ /**
|
||||
+ * @deprecated Will be replaced in 1.13
|
||||
+ * @param sample the new player list sample
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setSampleText(java.util.List<String> sample) {
|
||||
|
@ -34,6 +35,7 @@ index 3c38d857..cb8d0fcd 100644
|
|||
+
|
||||
+ /**
|
||||
+ * @deprecated Will be replaced in 1.13
|
||||
+ * @return the player list sample
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public java.util.List<String> getSampleText() {
|
||||
|
|
|
@ -13,7 +13,7 @@ completion, such as offline players.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..3071320e
|
||||
index 000000000..3c51aaf92
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/AsyncTabCompleteEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -154,7 +154,7 @@ index 00000000..3071320e
|
|||
+ * If true, the standard process of calling {@link Command#tabComplete(CommandSender, String, String[])}
|
||||
+ * or current player names will not be called.
|
||||
+ *
|
||||
+ * @param handled
|
||||
+ * @param handled if this completion should be marked as being handled
|
||||
+ */
|
||||
+ public void setHandled(boolean handled) {
|
||||
+ this.handled = handled;
|
||||
|
@ -170,7 +170,7 @@ index 00000000..3071320e
|
|||
+
|
||||
+ /**
|
||||
+ * Will provide no completions, and will not fire the synchronous process
|
||||
+ * @param cancelled
|
||||
+ * @param cancelled true if you wish to cancel this event
|
||||
+ */
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancelled) {
|
||||
|
@ -186,7 +186,7 @@ index 00000000..3071320e
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
index 6ac437d5..df6eb53d 100644
|
||||
index 6ac437d5e..df6eb53da 100644
|
||||
--- a/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/server/TabCompleteEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
|
|
@ -7,7 +7,7 @@ Provides basic elements of a PlayerProfile to be used by future API/events
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
|
||||
new file mode 100644
|
||||
index 00000000..e060c38a
|
||||
index 000000000..62f7aa2c8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/PlayerProfile.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -142,6 +142,7 @@ index 00000000..e060c38a
|
|||
+ * This is a blocking operation and should be done asynchronously.
|
||||
+ *
|
||||
+ * Optionally will also fill textures.
|
||||
+ * @param textures controls if we should fill the profile with texture properties
|
||||
+ * @return If the profile is now complete (has UUID and Name) (if you get rate limited, this operation may fail)
|
||||
+ */
|
||||
+ boolean complete(boolean textures);
|
||||
|
@ -156,13 +157,14 @@ index 00000000..e060c38a
|
|||
+
|
||||
+ /**
|
||||
+ * @deprecated Will be removed in 1.13
|
||||
+ * @return the GameProfile for this PlayerProfile
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ GameProfile getGameProfile();
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
|
||||
new file mode 100644
|
||||
index 00000000..d17061e6
|
||||
index 000000000..d17061e66
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/profile/ProfileProperty.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -239,7 +241,7 @@ index 00000000..d17061e6
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index ed403c33..690d9c07 100644
|
||||
index ed403c333..690d9c071 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;
|
||||
|
@ -291,7 +293,7 @@ index ed403c33..690d9c07 100644
|
|||
|
||||
public static Server.Spigot spigot()
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 87ab9d2b..f2ee6516 100644
|
||||
index 87ab9d2b8..f2ee6516e 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;
|
||||
|
|
|
@ -9,7 +9,7 @@ This allows you to override/extend the pumpkin/stare logic.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EndermanAttackPlayerEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EndermanAttackPlayerEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..55912659
|
||||
index 000000000..ab5a7a6b5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EndermanAttackPlayerEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -62,6 +62,8 @@ index 00000000..55912659
|
|||
+
|
||||
+ /**
|
||||
+ * The enderman considering attacking
|
||||
+ *
|
||||
+ * @return The enderman considering attacking
|
||||
+ */
|
||||
+ @Override
|
||||
+ public Enderman getEntity() {
|
||||
|
@ -70,6 +72,8 @@ index 00000000..55912659
|
|||
+
|
||||
+ /**
|
||||
+ * The player the Enderman is considering attacking
|
||||
+ *
|
||||
+ * @return The player the Enderman is considering attacking
|
||||
+ */
|
||||
+ public Player getPlayer() {
|
||||
+ return player;
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
|
|||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index c1689168..d0d86e1a 100644
|
||||
index 162a76e8b..056a4d6bb 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -0,0 +0,0 @@ public class Location implements Cloneable, ConfigurationSerializable {
|
||||
|
@ -58,6 +58,7 @@ index c1689168..d0d86e1a 100644
|
|||
+ *
|
||||
+ * Will break blocks and ignite blocks on fire.
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
|
@ -71,6 +72,7 @@ index c1689168..d0d86e1a 100644
|
|||
+ *
|
||||
+ * Will break blocks.
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @param setFire Whether or not to set blocks on fire
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
|
@ -83,6 +85,7 @@ index c1689168..d0d86e1a 100644
|
|||
+ * Creates explosion at this location with given power and optionally
|
||||
+ * setting blocks on fire, with the specified entity as the source.
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @param setFire Whether or not to set blocks on fire
|
||||
+ * @param breakBlocks Whether or not to have blocks be destroyed
|
||||
|
@ -95,7 +98,7 @@ index c1689168..d0d86e1a 100644
|
|||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index e7973c73..4ed7d2dc 100644
|
||||
index b983bdc54..c9c1a4352 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 {
|
||||
|
@ -108,6 +111,7 @@ index e7973c73..4ed7d2dc 100644
|
|||
+ * setting blocks on fire, with the specified entity as the source.
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param loc Location to blow up
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @param setFire Whether or not to set blocks on fire
|
||||
+ * @param breakBlocks Whether or not to have blocks be destroyed
|
||||
|
@ -122,6 +126,7 @@ index e7973c73..4ed7d2dc 100644
|
|||
+ * Will destroy other blocks
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param loc Location to blow up
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @param setFire Whether or not to set blocks on fire
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
|
@ -134,6 +139,7 @@ index e7973c73..4ed7d2dc 100644
|
|||
+ * Will set blocks on fire and destroy blocks.
|
||||
+ *
|
||||
+ * @param source The source entity of the explosion
|
||||
+ * @param loc Location to blow up
|
||||
+ * @param power The power of explosion, where 4F is TNT
|
||||
+ * @return false if explosion was canceled, otherwise true
|
||||
+ */
|
||||
|
|
|
@ -11,7 +11,7 @@ This adds a new Builder API which is much friendlier to use.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
|
||||
new file mode 100644
|
||||
index 00000000..f7aa162f
|
||||
index 000000000..feebfb653
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -52,6 +52,8 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sends the particle to all receiving players (or all).
|
||||
+ * This method is safe to use Asynchronously
|
||||
+ *
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder spawn() {
|
||||
+ if (this.location == null) {
|
||||
|
@ -74,6 +76,7 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Changes what particle will be sent
|
||||
+ * @param particle The particle
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder particle(Particle particle) {
|
||||
+ this.particle = particle;
|
||||
|
@ -105,6 +108,7 @@ index 00000000..f7aa162f
|
|||
+ * Sends this particle to all players in the world. This is rather silly and you should likely not be doing this.
|
||||
+ *
|
||||
+ * Just be a logical person and use receivers by radius or collection.
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder allPlayers() {
|
||||
+ this.receivers = null;
|
||||
|
@ -113,6 +117,7 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * @param receivers List of players to receive this particle, or null for all players in the world
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(@Nullable List<Player> receivers) {
|
||||
+ // Had to keep this as we first made API List<> and not Collection, but removing this may break plugins compiled on older jars
|
||||
|
@ -123,6 +128,7 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * @param receivers List of players to receive this particle, or null for all players in the world
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(@Nullable Collection<Player> receivers) {
|
||||
+ this.receivers = receivers != null ? Lists.newArrayList(receivers) : null;
|
||||
|
@ -131,6 +137,7 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * @param receivers List of players to be receive this particle, or null for all players in the world
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(Player... receivers) {
|
||||
+ this.receivers = receivers != null ? Lists.newArrayList(receivers) : null;
|
||||
|
@ -142,6 +149,7 @@ index 00000000..f7aa162f
|
|||
+ * If you want a more spherical check, see {@link #receivers(int, boolean)}
|
||||
+ *
|
||||
+ * @param radius amount to add on all axis
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(int radius) {
|
||||
+ return receivers(radius, radius);
|
||||
|
@ -153,6 +161,7 @@ index 00000000..f7aa162f
|
|||
+ * If byDistance is true, radius is tested by distance in a spherical shape
|
||||
+ * @param radius amount to add on each axis
|
||||
+ * @param byDistance true to use a spherical radius, false to use a cuboid
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(int radius, boolean byDistance) {
|
||||
+ if (!byDistance) {
|
||||
|
@ -181,6 +190,7 @@ index 00000000..f7aa162f
|
|||
+ *
|
||||
+ * @param xzRadius amount to add on the x/z axis
|
||||
+ * @param yRadius amount to add on the y axis
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(int xzRadius, int yRadius) {
|
||||
+ return receivers(xzRadius, yRadius, xzRadius);
|
||||
|
@ -193,6 +203,7 @@ index 00000000..f7aa162f
|
|||
+ * @param xzRadius amount to add on the x/z axis
|
||||
+ * @param yRadius amount to add on the y axis
|
||||
+ * @param byDistance true to use a cylinder shape, false to use cuboid
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(int xzRadius, int yRadius, boolean byDistance) {
|
||||
+ if (!byDistance) {
|
||||
|
@ -223,6 +234,7 @@ index 00000000..f7aa162f
|
|||
+ * @param xRadius amount to add on the x axis
|
||||
+ * @param yRadius amount to add on the y axis
|
||||
+ * @param zRadius amount to add on the z axis
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder receivers(int xRadius, int yRadius, int zRadius) {
|
||||
+ if (location == null) {
|
||||
|
@ -241,6 +253,7 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sets the source of this particle for visibility concerns (Vanish API)
|
||||
+ * @param source The player who is considered the source
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder source(Player source) {
|
||||
+ this.source = source;
|
||||
|
@ -257,6 +270,7 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sets the location of where to spawn the particle
|
||||
+ * @param location The location of the particle
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder location(Location location) {
|
||||
+ this.location = location.clone();
|
||||
|
@ -269,6 +283,7 @@ index 00000000..f7aa162f
|
|||
+ * @param x X location
|
||||
+ * @param y Y location
|
||||
+ * @param z Z location
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder location(World world, double x, double y, double z) {
|
||||
+ this.location = new Location(world, x, y, z);
|
||||
|
@ -285,6 +300,7 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sets the number of particles to spawn
|
||||
+ * @param count Number of particles
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder count(int count) {
|
||||
+ this.count = count;
|
||||
|
@ -293,18 +309,21 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Particle offset X. Varies by particle on how this is used
|
||||
+ * @return Particle offset X.
|
||||
+ */
|
||||
+ public double offsetX() {
|
||||
+ return offsetX;
|
||||
+ }
|
||||
+ /**
|
||||
+ * Particle offset Y. Varies by particle on how this is used
|
||||
+ * @return Particle offset Y.
|
||||
+ */
|
||||
+ public double offsetY() {
|
||||
+ return offsetY;
|
||||
+ }
|
||||
+ /**
|
||||
+ * Particle offset Z. Varies by particle on how this is used
|
||||
+ * @return Particle offset Z.
|
||||
+ */
|
||||
+ public double offsetZ() {
|
||||
+ return offsetZ;
|
||||
|
@ -312,6 +331,10 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Sets the particle offset. Varies by particle on how this is used
|
||||
+ * @param offsetX Particle offset X
|
||||
+ * @param offsetY Particle offset Y
|
||||
+ * @param offsetZ Particle offset Z
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder offset(double offsetX, double offsetY, double offsetZ) {
|
||||
+ this.offsetX = offsetX;
|
||||
|
@ -322,6 +345,7 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Gets the Particle extra data. Varies by particle on how this is used
|
||||
+ * @return the extra particle data
|
||||
+ */
|
||||
+ public double extra() {
|
||||
+ return extra;
|
||||
|
@ -329,6 +353,8 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Sets the particle extra data. Varies by particle on how this is used
|
||||
+ * @param extra the extra particle data
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder extra(double extra) {
|
||||
+ this.extra = extra;
|
||||
|
@ -337,6 +363,8 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Gets the particle custom data. Varies by particle on how this is used
|
||||
+ * @param <T> The Particle data type
|
||||
+ * @return the ParticleData for this particle
|
||||
+ */
|
||||
+ public <T> T data() {
|
||||
+ //noinspection unchecked
|
||||
|
@ -345,6 +373,9 @@ index 00000000..f7aa162f
|
|||
+
|
||||
+ /**
|
||||
+ * Sets the particle custom data. Varies by particle on how this is used
|
||||
+ * @param data The new particle data
|
||||
+ * @param <T> The Particle data type
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public <T> ParticleBuilder data(T data) {
|
||||
+ this.data = data;
|
||||
|
@ -357,6 +388,7 @@ index 00000000..f7aa162f
|
|||
+ * If false, the particle will show according to the client's particle settings.
|
||||
+ *
|
||||
+ * @param force true to force, false for normal
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder force(boolean force) {
|
||||
+ this.force = force;
|
||||
|
@ -366,6 +398,8 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sets the particle Color.
|
||||
+ * Only valid for REDSTONE, SPELL_MOB and SPELL_MOB_AMBIENT.
|
||||
+ * @param color the new particle color
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder color(Color color) {
|
||||
+ return color(color.getRed(), color.getGreen(), color.getBlue());
|
||||
|
@ -374,6 +408,10 @@ index 00000000..f7aa162f
|
|||
+ /**
|
||||
+ * Sets the particle Color.
|
||||
+ * Only valid for REDSTONE, SPELL_MOB and SPELL_MOB_AMBIENT.
|
||||
+ * @param r red color component
|
||||
+ * @param g green color component
|
||||
+ * @param b blue color component
|
||||
+ * @return a reference to this object.
|
||||
+ */
|
||||
+ public ParticleBuilder color(int r, int g, int b) {
|
||||
+ if (particle != Particle.REDSTONE && particle != Particle.SPELL_MOB && particle != Particle.SPELL_MOB_AMBIENT) {
|
||||
|
@ -394,7 +432,7 @@ index 00000000..f7aa162f
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
|
||||
index 9794c13e..cc9c2c5e 100644
|
||||
index 9794c13e5..6582e51f2 100644
|
||||
--- a/src/main/java/org/bukkit/Particle.java
|
||||
+++ b/src/main/java/org/bukkit/Particle.java
|
||||
@@ -0,0 +0,0 @@ public enum Particle {
|
||||
|
@ -405,6 +443,8 @@ index 9794c13e..cc9c2c5e 100644
|
|||
+ // Paper start - Particle API expansion
|
||||
+ /**
|
||||
+ * Creates a {@link com.destroystokyo.paper.ParticleBuilder}
|
||||
+ *
|
||||
+ * @return a {@link com.destroystokyo.paper.ParticleBuilder} for the particle
|
||||
+ */
|
||||
+ public com.destroystokyo.paper.ParticleBuilder builder() {
|
||||
+ return new com.destroystokyo.paper.ParticleBuilder(this);
|
||||
|
@ -412,7 +452,7 @@ index 9794c13e..cc9c2c5e 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3b81f81e..114e81dd 100644
|
||||
index 8d29ede0a..b983bdc54 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 {
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement deprecated player sample API
|
|||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
index dd1deafd..db992df2 100644
|
||||
index dd1deafdb..db992df24 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/server/PaperServerListPingEvent.java
|
||||
@@ -0,0 +0,0 @@ import static java.util.Objects.requireNonNull;
|
||||
|
@ -43,7 +43,7 @@ index dd1deafd..db992df2 100644
|
|||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
index cb8d0fcd..116d7c7a 100644
|
||||
index a293bc212..f552eab18 100644
|
||||
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
|
||||
@@ -0,0 +0,0 @@ import java.net.InetAddress;
|
||||
|
@ -60,16 +60,16 @@ index cb8d0fcd..116d7c7a 100644
|
|||
/**
|
||||
- * @deprecated Will be replaced in 1.13
|
||||
+ * @deprecated Will be removed in 1.13, use {@link PaperServerListPingEvent#getPlayerSample()}
|
||||
* @param sample the new player list sample
|
||||
*/
|
||||
@Deprecated
|
||||
public void setSampleText(java.util.List<String> sample) {
|
||||
@@ -0,0 +0,0 @@ public class ServerListPingEvent extends ServerEvent implements Iterable<Player>
|
||||
}
|
||||
|
||||
/**
|
||||
- * @deprecated Will be replaced in 1.13
|
||||
+ * @deprecated Will be removed in 1.13, use {@link PaperServerListPingEvent#getPlayerSample()}
|
||||
* @return the player list sample
|
||||
*/
|
||||
@Deprecated
|
||||
public java.util.List<String> getSampleText() {
|
||||
--
|
|
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index dd95773e..3924d00c 100644
|
||||
index dd95773e2..8fe01e47e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -0,0 +0,0 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
|
@ -17,6 +17,8 @@ index dd95773e..3924d00c 100644
|
|||
+ // Paper start
|
||||
+ /**
|
||||
+ * Force-closes the currently open inventory view for this player, if any.
|
||||
+ *
|
||||
+ * @param reason why the inventory is closing
|
||||
+ */
|
||||
+ public void closeInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason);
|
||||
+ // Paper end
|
||||
|
@ -25,7 +27,7 @@ index dd95773e..3924d00c 100644
|
|||
* Returns the ItemStack currently in your hand, can be empty.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
index 19889b27..e6e45b93 100644
|
||||
index 19889b278..e6e45b936 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryView;
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
|
|||
How long an entity has raised hands to charge an attack or use an item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 5921c952..5ccb8ef3 100644
|
||||
index 5921c9521..9c542951e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.Material;
|
||||
|
@ -36,11 +36,15 @@ index 5921c952..5ccb8ef3 100644
|
|||
+
|
||||
+ /**
|
||||
+ * Get how long the players hands have been raised (Charging Bow attack, using a potion, etc)
|
||||
+ *
|
||||
+ * @return Get how long the players hands have been raised (Charging Bow attack, using a potion, etc)
|
||||
+ */
|
||||
+ int getHandRaisedTime();
|
||||
+
|
||||
+ /**
|
||||
+ * Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
|
||||
+ *
|
||||
+ * @return Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food)
|
||||
+ */
|
||||
+ boolean isHandRaised();
|
||||
// Paper end
|
||||
|
|
|
@ -8,7 +8,7 @@ Plugins can skip selection of certain arrows and control which is used.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerReadyArrowEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerReadyArrowEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..c6add1b1
|
||||
index 000000000..6fde1e97f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerReadyArrowEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -58,14 +58,14 @@ index 00000000..c6add1b1
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * What bow the player is using to fire the arrow
|
||||
+ * @return the player is using to fire the arrow
|
||||
+ */
|
||||
+ public ItemStack getBow() {
|
||||
+ return bow;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * What arrow is being attempted to use
|
||||
+ * @return the arrow that is attempting to be used
|
||||
+ */
|
||||
+ public ItemStack getArrow() {
|
||||
+ return arrow;
|
||||
|
|
|
@ -9,7 +9,7 @@ Allows you to do dynamic whitelisting and change of kick message
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..662e79e3
|
||||
index 000000000..199daf2b3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/profile/ProfileWhitelistVerifyEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -67,7 +67,7 @@ index 00000000..662e79e3
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the currently planned message to send to the user if they are not whitelisted
|
||||
+ * @return the currently planned message to send to the user if they are not whitelisted
|
||||
+ */
|
||||
+ public String getKickMessage() {
|
||||
+ return kickMessage;
|
||||
|
@ -81,7 +81,7 @@ index 00000000..662e79e3
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * The gameprofile of the player trying to connect
|
||||
+ * @return the gameprofile of the player trying to connect
|
||||
+ * @deprecated Will be removed in 1.13, use #{@link #getPlayerProfile()}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
|
@ -97,7 +97,7 @@ index 00000000..662e79e3
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
|
||||
+ * @return Whether the player is whitelisted to play on this server (whitelist may be off is why its true)
|
||||
+ */
|
||||
+ public boolean isWhitelisted() {
|
||||
+ return whitelisted;
|
||||
|
@ -105,20 +105,21 @@ index 00000000..662e79e3
|
|||
+
|
||||
+ /**
|
||||
+ * Changes the players whitelisted state. false will deny the login
|
||||
+ * @param whitelisted The new whitelisted state
|
||||
+ */
|
||||
+ public void setWhitelisted(boolean whitelisted) {
|
||||
+ this.whitelisted = whitelisted;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns if the player obtained whitelist status by having op
|
||||
+ * @return if the player obtained whitelist status by having op
|
||||
+ */
|
||||
+ public boolean isOp() {
|
||||
+ return isOp;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns if the server even has whitelist on
|
||||
+ * @return if the server even has whitelist on
|
||||
+ */
|
||||
+ public boolean isWhitelistEnabled() {
|
||||
+ return whitelistEnabled;
|
||||
|
|
|
@ -27,7 +27,7 @@ index 079b9febe..c75bce07a 100644
|
|||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index f541107f7..7b166b213 100644
|
||||
index 20cc4e121..9b46e8892 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 {
|
||||
|
@ -39,7 +39,7 @@ index f541107f7..7b166b213 100644
|
|||
+ * Gets the chunk at the specified chunk key, which is the X and Z packed into a long.
|
||||
+ *
|
||||
+ * See {@link Chunk#getChunkKey()} for easy access to the key, or you may calculate it as:
|
||||
+ * long chunkKey = (long) chunkX & 0xffffffffL | ((long) chunkZ & 0xffffffffL) << 32;
|
||||
+ * long chunkKey = (long) chunkX & 0xffffffffL | ((long) chunkZ & 0xffffffffL) >> 32;
|
||||
+ *
|
||||
+ * @param chunkKey The Chunk Key to look up the chunk by
|
||||
+ * @return The chunk at the specified key
|
||||
|
|
|
@ -8,7 +8,7 @@ and to perform an attack.
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
|
||||
new file mode 100644
|
||||
index 00000000..7b07f10c
|
||||
index 000000000..ded25f214
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/RangedEntity.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -20,6 +20,7 @@ index 00000000..7b07f10c
|
|||
+ /**
|
||||
+ * Attack the specified entity using a ranged attack.
|
||||
+ *
|
||||
+ * @param target the entity to target
|
||||
+ * @param charge How "charged" the attack is (how far back the bow was pulled for Bow attacks).
|
||||
+ * This should be a value between 0 and 1, represented as targetDistance/maxDistance.
|
||||
+ */
|
||||
|
@ -41,7 +42,7 @@ index 00000000..7b07f10c
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Illusioner.java b/src/main/java/org/bukkit/entity/Illusioner.java
|
||||
index 7c92c431..14e6c5ee 100644
|
||||
index 7c92c431b..14e6c5ee0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Illusioner.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Illusioner.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -57,7 +58,7 @@ index 7c92c431..14e6c5ee 100644
|
|||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Llama.java b/src/main/java/org/bukkit/entity/Llama.java
|
||||
index 9422d56c..92c30ed5 100644
|
||||
index 9422d56cd..92c30ed5a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Llama.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Llama.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -75,7 +76,7 @@ index 9422d56c..92c30ed5 100644
|
|||
/**
|
||||
* Represents the base color that the llama has.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
|
||||
index e33d00b3..40157bef 100644
|
||||
index e33d00b30..40157befd 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Skeleton.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -92,7 +93,7 @@ index e33d00b3..40157bef 100644
|
|||
/**
|
||||
* Gets the current type of this skeleton.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java
|
||||
index 818efe2a..10f8f6d4 100644
|
||||
index 818efe2a4..10f8f6d45 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Snowman.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Snowman.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -109,7 +110,7 @@ index 818efe2a..10f8f6d4 100644
|
|||
/**
|
||||
* Gets whether this snowman is in "derp mode", meaning it is not wearing a
|
||||
diff --git a/src/main/java/org/bukkit/entity/Witch.java b/src/main/java/org/bukkit/entity/Witch.java
|
||||
index 9c5dc1f9..4b27f689 100644
|
||||
index 9c5dc1f97..4b27f6890 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Witch.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Witch.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -124,7 +125,7 @@ index 9c5dc1f9..4b27f689 100644
|
|||
+public interface Witch extends Monster, RangedEntity { // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wither.java b/src/main/java/org/bukkit/entity/Wither.java
|
||||
index 0922c5c6..c550ed06 100644
|
||||
index 0922c5c6a..c550ed061 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wither.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wither.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
|
|
@ -7,7 +7,7 @@ Fires when a witch consumes the potion in their hand
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/WitchConsumePotionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/WitchConsumePotionEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..e3035110
|
||||
index 000000000..790218998
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/WitchConsumePotionEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -36,7 +36,7 @@ index 00000000..e3035110
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the potion the witch will consume and have the effects applied.
|
||||
+ * @return the potion the witch will consume and have the effects applied.
|
||||
+ */
|
||||
+ public ItemStack getPotion() {
|
||||
+ return potion;
|
||||
|
@ -77,7 +77,7 @@ index 00000000..e3035110
|
|||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..6ef6367b
|
||||
index 000000000..6ef6367b6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
|
|
@ -7,7 +7,7 @@ Control what potion the witch readies to use
|
|||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java
|
||||
new file mode 100644
|
||||
index 00000000..5082662a
|
||||
index 000000000..0e0c6da71
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/event/entity/WitchReadyPotionEvent.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
@ -31,6 +31,9 @@ index 00000000..5082662a
|
|||
+
|
||||
+ /**
|
||||
+ * Fires thee event, returning the desired potion, or air of cancelled
|
||||
+ * @param witch the witch whom is readying to use a potion
|
||||
+ * @param potion the potion to be used
|
||||
+ * @return The ItemStack to be used
|
||||
+ */
|
||||
+ public static ItemStack process(Witch witch, ItemStack potion) {
|
||||
+ WitchReadyPotionEvent event = new WitchReadyPotionEvent(witch, potion);
|
||||
|
@ -46,7 +49,7 @@ index 00000000..5082662a
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the potion the witch is readying to use
|
||||
+ * @return the potion the witch is readying to use
|
||||
+ */
|
||||
+ public ItemStack getPotion() {
|
||||
+ return potion;
|
||||
|
|
Loading…
Reference in a new issue