mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-29 13:05:41 +01:00
3.1.6
This commit is contained in:
parent
ee17457403
commit
2b187f2066
2
pom.xml
2
pom.xml
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>3.1.5</version>
|
||||
<version>3.1.6</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -409,6 +409,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
new SendChunk();
|
||||
MainUtil.canSendChunk = true;
|
||||
} catch (final Throwable e) {
|
||||
e.printStackTrace();
|
||||
MainUtil.canSendChunk = false;
|
||||
}
|
||||
} else {
|
||||
|
@ -102,7 +102,7 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
World worldObj = Bukkit.getWorld(world);
|
||||
// Chunk chunk = worldObj.getChunkAt(loc.x, loc.z);
|
||||
worldObj.regenerateChunk(loc.x, loc.z);
|
||||
if (MainUtil.canSendChunk && BlockUpdateUtil.setBlockManager != null) {
|
||||
if (BlockUpdateUtil.setBlockManager != null) {
|
||||
BlockUpdateUtil.setBlockManager.update(world, Arrays.asList(loc));
|
||||
}
|
||||
for (final Player player : worldObj.getPlayers()) {
|
||||
|
@ -48,6 +48,7 @@ public class SendChunk {
|
||||
private RefConstructor MapChunk;
|
||||
private RefField connection;
|
||||
private RefMethod send;
|
||||
private RefMethod methodInitLighting;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -57,6 +58,7 @@ public class SendChunk {
|
||||
public SendChunk() throws NoSuchMethodException {
|
||||
methodGetHandlePlayer = classCraftPlayer.getMethod("getHandle");
|
||||
methodGetHandleChunk = classCraftChunk.getMethod("getHandle");
|
||||
methodInitLighting = classChunk.getMethod("initLighting");
|
||||
MapChunk = classMapChunk.getConstructor(classChunk.getRealClass(), boolean.class, int.class);
|
||||
connection = classEntityPlayer.getField("playerConnection");
|
||||
send = classConnection.getMethod("sendPacket", classPacket.getRealClass());
|
||||
@ -104,8 +106,8 @@ public class SendChunk {
|
||||
if (dx > view || dz > view) {
|
||||
continue;
|
||||
}
|
||||
net.minecraft.server.v1_8_R2.Chunk c = (net.minecraft.server.v1_8_R2.Chunk) methodGetHandleChunk.of(chunk).call();
|
||||
c.initLighting();
|
||||
Object c = methodGetHandleChunk.of(chunk).call();
|
||||
methodInitLighting.of(c).call();
|
||||
chunks.remove(chunk);
|
||||
Object con = connection.of(entity).get();
|
||||
// if (dx != 0 || dz != 0) {
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user