From 9c22c9759cf1460418eecb1224cc0bec509de0fa Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 14 Dec 2018 21:52:29 -0800 Subject: [PATCH] Tuinity API Patches --- pom.xml | 8 ++++-- src/main/java/org/bukkit/World.java | 28 +++++++++++++++++++++ src/main/java/org/bukkit/entity/Player.java | 23 +++++++++++++++++ 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 58a1f7d0..19d003fa 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,8 @@ - 1.8 - 1.8 + 11 + 11 UTF-8 @@ -154,6 +154,10 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 + + + true + diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index af0637f7..a3ed3154 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -3165,6 +3165,34 @@ public interface World extends PluginMessageRecipient, Metadatable { int getViewDistance(); // Spigot end + // Tuinity start - view distance api + /** + * Sets the view distance for this world. + * @param viewDistance view distance in [2, 32] + */ + void setViewDistance(int viewDistance); + + /** + * Returns the no-tick view distance for this world. + *

+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not + * be set to tick. + *

+ * @return The no-tick view distance for this world. + */ + int getNoTickViewDistance(); + + /** + * Sets the no-tick view distance for this world. + *

+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not + * be set to tick. + *

+ * @param viewDistance view distance in [2, 32] + */ + void setNoTickViewDistance(int viewDistance); + // Tuinity end - view distance api + // Spigot start public class Spigot { diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 877ea4f3..5367975a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1969,6 +1969,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM void resetCooldown(); // Paper end + // Tuinity start + /** + * Returns the no-tick view distance for this player. + *

+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not + * be set to tick. + *

+ * @return The no-tick view distance for this player. + */ + int getNoTickViewDistance(); + + /** + * Sets the no-tick view distance for this player. Setting to a value of -1 will default to the world no-tick + * view distance. + *

+ * No-tick view distance is the view distance where chunks will load, however the chunks and their entities will not + * be set to tick. + *

+ * @param viewDistance view distance in [2, 32] or -1 + */ + void setNoTickViewDistance(int viewDistance); + // Tuinity end + // Spigot start public class Spigot extends Entity.Spigot { -- 2.24.0