From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Fri, 14 Dec 2018 21:52:29 -0800 Subject: [PATCH] Tuinity API Changes diff --git a/pom.xml b/pom.xml index e66661eb84308dc13faa0d39b7487f40c1180443..6c200882954adc4831307f3d6dfa3202571fb30b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,18 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.destroystokyo.paper - paper-parent + com.tuinity + tuinity-parent dev-SNAPSHOT + ../pom.xml - com.destroystokyo.paper - paper-api + tuinity-api 1.16.5-R0.1-SNAPSHOT jar - Paper-API - https://github.com/PaperMC/Paper + Tuinity-API + https://github.com/Spottedleaf/Tuinity An enhanced plugin API for Minecraft servers. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1595,6 +1595,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi } // Paper end + // Tuinity start - add config to timings report + @NotNull + public org.bukkit.configuration.file.YamlConfiguration getTuinityConfig() + { + throw new UnsupportedOperationException("Not supported yet."); + } + // Tuinity end - add config to timings report + /** * Sends the component to the player * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 064497506e6a5ab89ca43b99968ca79d51d67c46..5848c8c03a1520b95c9f494e0820e075f1757fc6 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -3508,6 +3508,26 @@ public interface World extends PluginMessageRecipient, Metadatable, net.kyori.ad * @param viewDistance view distance in [2, 32] */ void setNoTickViewDistance(int viewDistance); + + // Tuinity start - add view distances + /** + * Gets the sending view distance for this world. + *

+ * Sending view distance is the view distance where chunks will load in for players in this world. + *

+ * @return The sending view distance for this world. + */ + public int getSendViewDistance(); + + /** + * Sets the sending view distance for this world. + *

+ * Sending view distance is the view distance where chunks will load in for players in this world. + *

+ * @param viewDistance view distance in [2, 32] or -1 + */ + public void setSendViewDistance(int viewDistance); + // Tuinity end - add view distances // Paper end - view distance api // Spigot start diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java index 2ea531eaef8c455fdd503f0c0258813fe9136085..a84ea92d02d34cd48174152e0391f1af6c6b5def 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1768,23 +1768,63 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM * Gets the view distance for this player * * @return the player's view distance - * @deprecated This is unimplemented and will throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work. + * // Tuinity - implemented * @see org.bukkit.World#getViewDistance() * @see org.bukkit.World#getNoTickViewDistance() */ - @Deprecated + //@Deprecated // Tuinity - implemented public int getViewDistance(); /** * Sets the view distance for this player * * @param viewDistance the player's view distance - * @deprecated This is unimplemented and will throw an exception at runtime. The {@link org.bukkit.World World}-based methods still work. + * // Tuinity - implemented * @see org.bukkit.World#setViewDistance(int) * @see org.bukkit.World#setNoTickViewDistance(int) */ - @Deprecated + //@Deprecated // Tuinity - implemented public void setViewDistance(int viewDistance); + + // Tuinity start - add view distances api + /** + * Gets the no-ticking 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. + */ + public int getNoTickViewDistance(); + + /** + * Sets the no-ticking 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. + *

+ * @param viewDistance view distance in [2, 32] or -1 + */ + public void setNoTickViewDistance(int viewDistance); + + /** + * Gets the sending view distance for this player. + *

+ * Sending view distance is the view distance where chunks will load in for players. + *

+ * @return The sending view distance for this player. + */ + public int getSendViewDistance(); + + /** + * Sets the sending view distance for this player. + *

+ * Sending view distance is the view distance where chunks will load in for players. + *

+ * @param viewDistance view distance in [2, 32] or -1 + */ + public void setSendViewDistance(int viewDistance); + // Tuinity end - add view distances api // Paper end /**