|
13 | 13 | import org.bukkit.Material;
|
14 | 14 | import org.bukkit.block.Biome;
|
15 | 15 | import org.bukkit.entity.EntityType;
|
| 16 | +import org.eclipse.jdt.annotation.NonNull; |
16 | 17 |
|
17 | 18 | import com.google.common.base.Enums;
|
18 | 19 |
|
@@ -862,6 +863,36 @@ public String getDefaultNewPlayerAction()
|
862 | 863 | }
|
863 | 864 |
|
864 | 865 |
|
| 866 | + /** |
| 867 | + * {@inheritDoc} |
| 868 | + */ |
| 869 | + @Override |
| 870 | + public boolean isMakeNetherPortals() |
| 871 | + { |
| 872 | + return this.makeNetherPortals; |
| 873 | + } |
| 874 | + |
| 875 | + |
| 876 | + /** |
| 877 | + * {@inheritDoc} |
| 878 | + */ |
| 879 | + @Override |
| 880 | + public boolean isMakeEndPortals() |
| 881 | + { |
| 882 | + return this.makeEndPortals; |
| 883 | + } |
| 884 | + |
| 885 | + |
| 886 | + /** |
| 887 | + * {@inheritDoc} |
| 888 | + */ |
| 889 | + @Override |
| 890 | + public @NonNull List<String> getOnRespawnCommands() |
| 891 | + { |
| 892 | + return this.onRespawnCommands; |
| 893 | + } |
| 894 | + |
| 895 | + |
865 | 896 | // ---------------------------------------------------------------------
|
866 | 897 | // Section: Setters
|
867 | 898 | // ---------------------------------------------------------------------
|
@@ -2001,6 +2032,39 @@ public boolean isCheckForBlocks() {
|
2001 | 2032 | }
|
2002 | 2033 |
|
2003 | 2034 |
|
| 2035 | + /** |
| 2036 | + * Sets make nether portals. |
| 2037 | + * |
| 2038 | + * @param makeNetherPortals the make nether portals |
| 2039 | + */ |
| 2040 | + public void setMakeNetherPortals(boolean makeNetherPortals) |
| 2041 | + { |
| 2042 | + this.makeNetherPortals = makeNetherPortals; |
| 2043 | + } |
| 2044 | + |
| 2045 | + |
| 2046 | + /** |
| 2047 | + * Sets make end portals. |
| 2048 | + * |
| 2049 | + * @param makeEndPortals the make end portals |
| 2050 | + */ |
| 2051 | + public void setMakeEndPortals(boolean makeEndPortals) |
| 2052 | + { |
| 2053 | + this.makeEndPortals = makeEndPortals; |
| 2054 | + } |
| 2055 | + |
| 2056 | + |
| 2057 | + /** |
| 2058 | + * Sets on respawn commands. |
| 2059 | + * |
| 2060 | + * @param onRespawnCommands the on respawn commands |
| 2061 | + */ |
| 2062 | + public void setOnRespawnCommands(List<String> onRespawnCommands) |
| 2063 | + { |
| 2064 | + this.onRespawnCommands = onRespawnCommands; |
| 2065 | + } |
| 2066 | + |
| 2067 | + |
2004 | 2068 | // ---------------------------------------------------------------------
|
2005 | 2069 | // Section: Variables
|
2006 | 2070 | // ---------------------------------------------------------------------
|
@@ -2207,6 +2271,12 @@ public boolean isCheckForBlocks() {
|
2207 | 2271 | @ConfigEntry(path = "world.nether.blocks", needsReset = true)
|
2208 | 2272 | private List<String> netherBlocks = new ArrayList<>();
|
2209 | 2273 |
|
| 2274 | + @ConfigComment("This option indicates if nether portals should be linked via dimensions.") |
| 2275 | + @ConfigComment("Option will simulate vanilla portal mechanics that links portals together") |
| 2276 | + @ConfigComment("or creates a new portal, if there is not a portal in that dimension.") |
| 2277 | + @ConfigEntry(path = "world.nether.create-and-link-portals") |
| 2278 | + private boolean makeNetherPortals = false; |
| 2279 | + |
2210 | 2280 | // End
|
2211 | 2281 | @ConfigEntry(path = "world.end.generate")
|
2212 | 2282 | private boolean endGenerate = true;
|
@@ -2245,6 +2315,11 @@ public boolean isCheckForBlocks() {
|
2245 | 2315 | @ConfigEntry(path = "world.end.blocks", needsReset = true)
|
2246 | 2316 | private List<String> endBlocks = new ArrayList<>();
|
2247 | 2317 |
|
| 2318 | + @ConfigComment("This option indicates if obsidian platform in the end should be generated") |
| 2319 | + @ConfigComment("when player enters the end world.") |
| 2320 | + @ConfigEntry(path = "world.end.create-obsidian-platform") |
| 2321 | + private boolean makeEndPortals = false; |
| 2322 | + |
2248 | 2323 | // Other staff.
|
2249 | 2324 |
|
2250 | 2325 | @ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /cave")
|
@@ -2440,14 +2515,51 @@ public boolean isCheckForBlocks() {
|
2440 | 2515 | private boolean pasteMissingIslands = false;
|
2441 | 2516 |
|
2442 | 2517 | // Commands
|
2443 |
| - @ConfigComment("List of commands to run when a player joins.") |
2444 |
| - @ConfigEntry(path = "cave.commands.on-join") |
| 2518 | + @ConfigComment("List of commands to run when a player joins an cave or creates one.") |
| 2519 | + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") |
| 2520 | + @ConfigComment("in which case they are executed by the player.") |
| 2521 | + @ConfigComment("") |
| 2522 | + @ConfigComment("Available placeholders for the commands are the following:") |
| 2523 | + @ConfigComment(" * [name]: name of the player") |
| 2524 | + @ConfigComment("") |
| 2525 | + @ConfigComment("Here are some examples of valid commands to execute:") |
| 2526 | + @ConfigComment(" * '[SUDO] bbox version'") |
| 2527 | + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") |
| 2528 | + @ConfigComment("") |
| 2529 | + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") |
| 2530 | + @ConfigEntry(path = "cave.commands.on-join", since = "1.8.0") |
2445 | 2531 | private List<String> onJoinCommands = new ArrayList<>();
|
2446 | 2532 |
|
2447 |
| - @ConfigComment("list of commands to run when a player leaves.") |
2448 |
| - @ConfigEntry(path = "cave.commands.on-leave") |
| 2533 | + @ConfigComment("List of commands to run when a player leaves a cave, resets his cave or gets kicked from it.") |
| 2534 | + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") |
| 2535 | + @ConfigComment("in which case they are executed by the player.") |
| 2536 | + @ConfigComment("") |
| 2537 | + @ConfigComment("Available placeholders for the commands are the following:") |
| 2538 | + @ConfigComment(" * [name]: name of the player") |
| 2539 | + @ConfigComment("") |
| 2540 | + @ConfigComment("Here are some examples of valid commands to execute:") |
| 2541 | + @ConfigComment(" * '[SUDO] bbox version'") |
| 2542 | + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") |
| 2543 | + @ConfigComment("") |
| 2544 | + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") |
| 2545 | + @ConfigEntry(path = "cave.commands.on-leave", since = "1.8.0") |
2449 | 2546 | private List<String> onLeaveCommands = new ArrayList<>();
|
2450 | 2547 |
|
| 2548 | + @ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.") |
| 2549 | + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") |
| 2550 | + @ConfigComment("in which case they are executed by the player.") |
| 2551 | + @ConfigComment("") |
| 2552 | + @ConfigComment("Available placeholders for the commands are the following:") |
| 2553 | + @ConfigComment(" * [name]: name of the player") |
| 2554 | + @ConfigComment("") |
| 2555 | + @ConfigComment("Here are some examples of valid commands to execute:") |
| 2556 | + @ConfigComment(" * '[SUDO] bbox version'") |
| 2557 | + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") |
| 2558 | + @ConfigComment("") |
| 2559 | + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") |
| 2560 | + @ConfigEntry(path = "cave.commands.on-respawn", since = "1.14.0") |
| 2561 | + private List<String> onRespawnCommands = new ArrayList<>(); |
| 2562 | + |
2451 | 2563 | // Sethome
|
2452 | 2564 | @ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.")
|
2453 | 2565 | @ConfigEntry(path = "cave.sethome.nether.allow")
|
|
0 commit comments