mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fixed #2469
This commit is contained in:
parent
920796d8ec
commit
008237b2a4
@ -54,8 +54,8 @@ import org.bukkit.metadata.MetadataValue;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -598,14 +598,15 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override public QueueProvider initBlockQueue() {
|
@Override public QueueProvider initBlockQueue() {
|
||||||
try {
|
//TODO Figure out why this code is still here yet isn't being called anywhere.
|
||||||
new SendChunk();
|
// try {
|
||||||
MainUtil.canSendChunk = true;
|
// new SendChunk();
|
||||||
} catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException e) {
|
// MainUtil.canSendChunk = true;
|
||||||
PlotSquared.debug(
|
// } catch (ClassNotFoundException | NoSuchFieldException | NoSuchMethodException e) {
|
||||||
SendChunk.class + " does not support " + StringMan.getString(getServerVersion()));
|
// PlotSquared.debug(
|
||||||
MainUtil.canSendChunk = false;
|
// SendChunk.class + " does not support " + StringMan.getString(getServerVersion()));
|
||||||
}
|
// MainUtil.canSendChunk = false;
|
||||||
|
// }
|
||||||
return QueueProvider.of(BukkitLocalQueue.class, BukkitLocalQueue.class);
|
return QueueProvider.of(BukkitLocalQueue.class, BukkitLocalQueue.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,6 @@ public class SendChunk {
|
|||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public SendChunk() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException {
|
public SendChunk() throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException {
|
||||||
RefConstructor tempMapChunk;
|
|
||||||
RefClass classCraftPlayer = getRefClass("{cb}.entity.CraftPlayer");
|
RefClass classCraftPlayer = getRefClass("{cb}.entity.CraftPlayer");
|
||||||
this.methodGetHandlePlayer = classCraftPlayer.getMethod("getHandle");
|
this.methodGetHandlePlayer = classCraftPlayer.getMethod("getHandle");
|
||||||
RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
|
RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
|
||||||
@ -50,8 +49,7 @@ public class SendChunk {
|
|||||||
RefClass classChunk = getRefClass("{nms}.Chunk");
|
RefClass classChunk = getRefClass("{nms}.Chunk");
|
||||||
this.methodInitLighting = classChunk.getMethod("initLighting");
|
this.methodInitLighting = classChunk.getMethod("initLighting");
|
||||||
RefClass classMapChunk = getRefClass("{nms}.PacketPlayOutMapChunk");
|
RefClass classMapChunk = getRefClass("{nms}.PacketPlayOutMapChunk");
|
||||||
tempMapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), int.class);
|
this.mapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), int.class);
|
||||||
this.mapChunk = tempMapChunk;
|
|
||||||
RefClass classEntityPlayer = getRefClass("{nms}.EntityPlayer");
|
RefClass classEntityPlayer = getRefClass("{nms}.EntityPlayer");
|
||||||
this.connection = classEntityPlayer.getField("playerConnection");
|
this.connection = classEntityPlayer.getField("playerConnection");
|
||||||
RefClass classPacket = getRefClass("{nms}.Packet");
|
RefClass classPacket = getRefClass("{nms}.Packet");
|
||||||
|
Loading…
Reference in New Issue
Block a user