mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix refresh chunk for 1.7.X
This commit is contained in:
parent
5f3fab5e42
commit
3aa7a74626
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.11.17</version>
|
||||
<version>2.11.18</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -438,6 +438,12 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
e.printStackTrace();
|
||||
BukkitSetBlockManager.setBlockManager = new SetBlockSlow();
|
||||
}
|
||||
try {
|
||||
new SendChunk();
|
||||
MainUtil.canSendChunk = true;
|
||||
} catch (final Throwable e) {
|
||||
MainUtil.canSendChunk = false;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
BukkitSetBlockManager.setBlockManager = new SetBlockFast();
|
||||
@ -447,12 +453,6 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
}
|
||||
}
|
||||
BlockUpdateUtil.setBlockManager = BukkitSetBlockManager.setBlockManager;
|
||||
try {
|
||||
new SendChunk();
|
||||
MainUtil.canSendChunk = true;
|
||||
} catch (final Throwable e) {
|
||||
MainUtil.canSendChunk = false;
|
||||
}
|
||||
return BlockManager.manager = new BukkitUtil();
|
||||
}
|
||||
|
||||
|
@ -373,11 +373,6 @@ public class PlotSquared {
|
||||
if (!config.contains(path)) {
|
||||
config.createSection(path);
|
||||
}
|
||||
|
||||
System.out.print("GENERATOR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
System.out.print(generator != null);
|
||||
System.out.print(generator instanceof PlotGenerator);
|
||||
|
||||
plotWorld.TYPE = generator instanceof PlotGenerator ? 0 : 2;
|
||||
plotWorld.TERRAIN = 0;
|
||||
plotWorld.saveConfiguration(config.getConfigurationSection(path));
|
||||
|
@ -26,17 +26,11 @@ public class BukkitSetupUtils extends SetupUtils {
|
||||
}
|
||||
final String testWorld = "CheckingPlotSquaredGenerator";
|
||||
for (final Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
System.out.print(plugin.getName());
|
||||
if (plugin.isEnabled()) {
|
||||
System.out.print(" - enabled");
|
||||
final ChunkGenerator generator = plugin.getDefaultWorldGenerator(testWorld, "");
|
||||
if (generator != null) {
|
||||
System.out.print(" - non null");
|
||||
PlotSquared.removePlotWorld(testWorld);
|
||||
final String name = plugin.getDescription().getName();
|
||||
if (generator instanceof PlotGenerator) {
|
||||
System.out.print(" - ps gen");
|
||||
}
|
||||
// final PlotGenerator pgen = (PlotGenerator) generator;
|
||||
// if (pgen.getPlotManager() instanceof SquarePlotManager) {
|
||||
SetupUtils.generators.put(name, generator);
|
||||
|
@ -121,8 +121,9 @@ public class SetBlockFast extends BukkitSetBlockManager {
|
||||
}
|
||||
if (!MainUtil.canSendChunk) {
|
||||
for (Chunk chunk : chunks) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
chunk.load(true);
|
||||
chunk.unload(true, false);
|
||||
// chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
chunk.load();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -333,8 +333,8 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
||||
}
|
||||
if (!MainUtil.canSendChunk) {
|
||||
for (Chunk chunk : chunks) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
chunk.load(true);
|
||||
chunk.unload(true, false);
|
||||
chunk.load();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user