mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Start 3.3.4 work to support 1.9.4
This commit is contained in:
parent
b7ebde874f
commit
1db3d1aa72
@ -1,6 +1,6 @@
|
|||||||
dependencies {
|
dependencies {
|
||||||
compile project(':Core')
|
compile project(':Core')
|
||||||
compile 'org.bukkit:bukkit:1.9-R0.1-SNAPSHOT'
|
compile 'org.bukkit:bukkit:1.9.2-R0.1-SNAPSHOT'
|
||||||
compile 'org.mcstats.bukkit:metrics:R7'
|
compile 'org.mcstats.bukkit:metrics:R7'
|
||||||
compile 'net.milkbowl.vault:VaultAPI:1.5'
|
compile 'net.milkbowl.vault:VaultAPI:1.5'
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,11 @@ 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");
|
||||||
|
if (PS.get().checkVersion(PS.get().IMP.getServerVersion(), 1, 9, 4)) {
|
||||||
|
this.mapChunk = null; //todo
|
||||||
|
} else {
|
||||||
this.mapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), boolean.class, int.class);
|
this.mapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), boolean.class, int.class);
|
||||||
|
}
|
||||||
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");
|
||||||
@ -105,7 +109,12 @@ public class SendChunk {
|
|||||||
Object c = this.methodGetHandleChunk.of(chunk).call();
|
Object c = this.methodGetHandleChunk.of(chunk).call();
|
||||||
chunks.remove(chunk);
|
chunks.remove(chunk);
|
||||||
Object con = this.connection.of(entity).get();
|
Object con = this.connection.of(entity).get();
|
||||||
Object packet = this.mapChunk.create(c, true, 65535);
|
Object packet;
|
||||||
|
if (PS.get().checkVersion(PS.get().IMP.getServerVersion(), 1, 9, 4)) {
|
||||||
|
packet = null; //todo
|
||||||
|
} else {
|
||||||
|
packet = this.mapChunk.create(c, true, 65535);
|
||||||
|
}
|
||||||
this.send.of(con).call(packet);
|
this.send.of(con).call(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user