From de98ff5d8007836a679070133b424db6c4388b9b Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Sat, 29 Aug 2015 03:12:41 -0500
Subject: [PATCH] Use spigot.yml's view distance setting

---
 Spigot-Server-Patches/Add-player-view-distance-API.patch | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Spigot-Server-Patches/Add-player-view-distance-API.patch b/Spigot-Server-Patches/Add-player-view-distance-API.patch
index ae4383bd49..011435a260 100644
--- a/Spigot-Server-Patches/Add-player-view-distance-API.patch
+++ b/Spigot-Server-Patches/Add-player-view-distance-API.patch
@@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
          super(worldserver, gameprofile);
-+        this.viewDistance = worldserver.getServer().getViewDistance(); // PaperSpigot - Player view distance API
++        this.viewDistance = world.spigotConfig.viewDistance; // PaperSpigot - Player view distance API
          playerinteractmanager.player = this;
          this.playerInteractManager = playerinteractmanager;
          BlockPosition blockposition = worldserver.getSpawn();
@@ -134,6 +134,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
      };
  
      public Player.Spigot spigot()
--- 
-1.9.5.msysgit.1
-
+--
\ No newline at end of file