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