-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/com/github/jikoo/regionerator/hooks/TerrainerHook.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.github.jikoo.regionerator.hooks; | ||
|
||
import com.epicnicity322.terrainer.core.terrain.Terrain; | ||
import com.epicnicity322.terrainer.core.terrain.TerrainManager; | ||
import com.epicnicity322.terrainer.core.terrain.WorldTerrain; | ||
import org.bukkit.World; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
/** | ||
* PluginHook for <a href="https://github.com/chrisrnj/Terrainer">Terrainer</a>. | ||
*/ | ||
public class TerrainerHook extends PluginHook { | ||
|
||
public TerrainerHook() { | ||
super("Terrainer"); | ||
} | ||
|
||
@Override | ||
public boolean isChunkProtected(@NotNull World chunkWorld, int chunkX, int chunkZ) { | ||
for (Terrain terrain : TerrainManager.terrainsAtChunk(chunkWorld.getUID(), chunkX, chunkZ)) { | ||
if (!(terrain instanceof WorldTerrain)) return true; // Global world terrain is ignored. | ||
} | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isAsyncCapable() { | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ softdepend: | |
- Multiverse-Core | ||
- RedProtect | ||
- Residence | ||
- Terrainer | ||
- Towny | ||
- WorldGuard | ||
|
||
|