This commit is contained in:
Sutton Hathorn 2019-05-22 21:23:58 +00:00 committed by GitHub
commit fbbdf372a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 7 deletions

12
pom.xml
View File

@ -35,14 +35,14 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.13.1-R0.1-SNAPSHOT</version>
<version>1.14.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--Bukkit API-->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13.1-R0.1-SNAPSHOT</version>
<version>1.14.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--Dynmap API-->
@ -57,7 +57,13 @@
<artifactId>paperlib</artifactId>
<version>1.0.2</version>
<scope>compile</scope>
</dependency>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>

View File

@ -327,8 +327,18 @@ public class BorderData
safeOpenBlocks.add(Material.WALL_TORCH);
safeOpenBlocks.add(Material.REDSTONE_WIRE);
safeOpenBlocks.add(Material.WHEAT);
safeOpenBlocks.add(Material.SIGN);
safeOpenBlocks.add(Material.WALL_SIGN);
safeOpenBlocks.add(Material.OAK_SIGN);
safeOpenBlocks.add(Material.SPRUCE_SIGN);
safeOpenBlocks.add(Material.BIRCH_SIGN);
safeOpenBlocks.add(Material.JUNGLE_SIGN);
safeOpenBlocks.add(Material.ACACIA_SIGN);
safeOpenBlocks.add(Material.DARK_OAK_SIGN);
safeOpenBlocks.add(Material.OAK_WALL_SIGN);
safeOpenBlocks.add(Material.SPRUCE_WALL_SIGN);
safeOpenBlocks.add(Material.BIRCH_WALL_SIGN);
safeOpenBlocks.add(Material.JUNGLE_WALL_SIGN);
safeOpenBlocks.add(Material.ACACIA_WALL_SIGN);
safeOpenBlocks.add(Material.DARK_OAK_WALL_SIGN);
safeOpenBlocks.add(Material.LADDER);
safeOpenBlocks.add(Material.LEVER);
safeOpenBlocks.add(Material.LIGHT_WEIGHTED_PRESSURE_PLATE);

View File

@ -75,6 +75,8 @@ public class WBListener implements Listener
* Check if there is a fill task running, and if yes, if it's for the
* world that the unload event refers to and if the chunk should be
* kept in memory because generation still needs it.
*
* setCancelled deprecated in 1.14.1-R0.1 Bukkit API
*/
@EventHandler
public void onChunkUnload(ChunkUnloadEvent e)
@ -85,7 +87,8 @@ public class WBListener implements Listener
if (e.getWorld() == Config.fillTask.getWorld()
&& Config.fillTask.chunkOnUnloadPreventionList(chunk.getX(), chunk.getZ()))
{
e.setCancelled(true);
Config.logWarn("Unloading a chunk we still need!");
//e.setCancelled(true);
}
}
}

View File

@ -234,7 +234,10 @@ public class WorldFillTask implements Runnable
if (worldData.doesChunkExist(dependency.forX, dependency.forZ))
chunksToUnload.add(new CoordXZ(dependency.neededX, dependency.neededZ));
else
{
world.setChunkForceLoaded(dependency.neededX, dependency.neededZ, true);
newPreventUnload.add(dependency);
}
}
preventUnload = newPreventUnload;
@ -247,6 +250,7 @@ public class WorldFillTask implements Runnable
for (CoordXZ unload: chunksToUnload)
{
if (!chunkOnUnloadPreventionList(unload.x, unload.z))
world.setChunkForceLoaded(unload.x, unload.z, false);
world.unloadChunkRequest(unload.x, unload.z);
}
@ -443,6 +447,7 @@ public class WorldFillTask implements Runnable
preventUnload = null;
for (UnloadDependency entry: tempPreventUnload)
{
world.setChunkForceLoaded(entry.neededX, entry.neededZ, false);
world.unloadChunkRequest(entry.neededX, entry.neededZ);
}
}

View File

@ -2,7 +2,7 @@ name: WorldBorder
author: Brettflan
description: Efficient, feature-rich plugin for limiting the size of your worlds.
version: 1.9.9 (beta)
api-version: 1.13
api-version: 1.14
main: com.wimbli.WorldBorder.WorldBorder
softdepend:
- dynmap