spigot/Bukkit-Patches/0015-View-Distance.patch
2023-04-19 20:03:29 +10:00

37 lines
1.2 KiB
Diff

From 81d50a9ae04c3811408d865bc8716f64d6475e46 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 4eef5ed3..a0bf4166 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -2682,6 +2682,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@Nullable
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
+ // Spigot start
+ /**
+ * Returns the view distance used for this world.
+ *
+ * @return the view distance used for this world
+ */
+ int getViewDistance();
+
+ /**
+ * Returns the simulation distance used for this world.
+ *
+ * @return the simulation distance used for this world
+ */
+ int getSimulationDistance();
+ // Spigot end
+
// Spigot start
public class Spigot {
--
2.40.0