From 4d4950090d438b8e6c6d8d03821a83d6d3157dd8 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 10 Mar 2017 07:07:50 +1100 Subject: [PATCH] Fix 1.7 block placer --- .../plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java | 5 ++++- .../java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java b/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java index d55ae2fd7..c1cb7eae9 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/util/block/BukkitLocalQueue_1_7.java @@ -25,7 +25,9 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue { private final ReflectionUtils.RefClass classChunk = getRefClass("{nms}.Chunk"); private final ReflectionUtils.RefClass classWorld = getRefClass("{nms}.World"); private final ReflectionUtils.RefClass classCraftWorld = getRefClass("{cb}.CraftWorld"); + private final ReflectionUtils.RefClass classCraftChunk = getRefClass("{cb}.CraftChunk"); private final ReflectionUtils.RefMethod methodGetHandle; + private final ReflectionUtils.RefMethod methodGetHandleChunk; private final ReflectionUtils.RefMethod methodGetChunkAt; private final ReflectionUtils.RefMethod methodA; private final ReflectionUtils.RefMethod methodGetById; @@ -40,6 +42,7 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue { this.methodGetChunkAt = this.classWorld.getMethod("getChunkAt", int.class, int.class); this.methodA = this.classChunk.getMethod("a", int.class, int.class, int.class, this.classBlock, int.class); this.methodGetById = this.classBlock.getMethod("getById", int.class); + this.methodGetHandleChunk = this.classCraftChunk.getMethod("getHandle"); this.methodInitLighting = this.classChunk.getMethod("initLighting"); this.sendChunk = new SendChunk(); TaskManager.runTaskRepeat(new Runnable() { @@ -87,7 +90,7 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue { @Override public void fixChunkLighting(int x, int z) { - Object c = this.methodGetHandle.of(getChunk(x, z)).call(); + Object c = this.methodGetHandleChunk.of(getChunk(x, z)).call(); this.methodInitLighting.of(c).call(); } diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java b/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java index 1b1eb87bb..d1c302e91 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/uuid/FileUUIDHandler.java @@ -2,8 +2,6 @@ package com.plotsquared.bukkit.uuid; import com.google.common.collect.HashBiMap; import com.google.common.collect.Sets; -import com.google.common.io.ByteSource; -import com.google.common.io.InputSupplier; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.Settings;