spigot/Bukkit-Patches/0015-View-Distance.patch

31 lines
997 B
Diff
Raw Normal View History

From 74e27c0c74604478bd636ab2b708d05f0e6717ac Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Tue, 30 Jul 2019 13:47:34 -0700
Subject: [PATCH] View Distance
This commit allows the retrieval of per world view distances.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 01c631df..dd0fef91 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2362,6 +2362,15 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
public Location locateNearestStructure(@NotNull Location origin, @NotNull StructureType structureType, int radius, boolean findUnexplored);
+ // Spigot start
+ /**
+ * Returns the view distance used for this world.
+ *
+ * @return the view distance used for this world
+ */
+ int getViewDistance();
+ // Spigot end
+
// Spigot start
2020-01-24 17:56:32 +11:00
public class Spigot {
--
2.25.1