Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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-->
Expand All @@ -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>
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/com/wimbli/WorldBorder/BorderData.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,18 @@ public Location correctedPosition(Location loc)
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);
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/wimbli/WorldBorder/WBListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public void onChunkLoad(ChunkLoadEvent event)
* 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)
Expand All @@ -85,7 +87,8 @@ public void onChunkUnload(ChunkUnloadEvent e)
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);
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/com/wimbli/WorldBorder/WorldFillTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@ public void run()
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;

Expand All @@ -247,6 +250,7 @@ public void run()
for (CoordXZ unload: chunksToUnload)
{
if (!chunkOnUnloadPreventionList(unload.x, unload.z))
world.setChunkForceLoaded(unload.x, unload.z, false);
world.unloadChunkRequest(unload.x, unload.z);
}

Expand Down Expand Up @@ -443,6 +447,7 @@ private void stop()
preventUnload = null;
for (UnloadDependency entry: tempPreventUnload)
{
world.setChunkForceLoaded(entry.neededX, entry.neededZ, false);
world.unloadChunkRequest(entry.neededX, entry.neededZ);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down