From 9f4ac86fb46b27458618cb0dec3803b663c743bb Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 16 Mar 2021 21:34:37 +0200 Subject: [PATCH] Expose BentoBox 1.16 portal generation mechanics. (#13) BentoBoxWorld/BentoBox#1718 --- .../java/world/bentobox/boxed/Settings.java | 23 ++++++++++++++++++- src/main/resources/config.yml | 5 ++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/boxed/Settings.java b/src/main/java/world/bentobox/boxed/Settings.java index 7727631..9e4ec97 100644 --- a/src/main/java/world/bentobox/boxed/Settings.java +++ b/src/main/java/world/bentobox/boxed/Settings.java @@ -172,6 +172,12 @@ public class Settings implements WorldSettings { @ConfigEntry(path = "world.nether.spawn-radius") private int netherSpawnRadius = 32; + @ConfigComment("This option indicates if nether portals should be linked via dimensions.") + @ConfigComment("Option will simulate vanilla portal mechanics that links portals together") + @ConfigComment("or creates a new portal, if there is not a portal in that dimension.") + @ConfigEntry(path = "world.nether.create-and-link-portals", since = "1.16") + private boolean makeNetherPortals = false; + // End @ConfigComment("End Nether - if this is false, the end world will not be made and access to") @ConfigComment("the end will not occur. Other plugins may still enable portal usage.") @@ -1734,5 +1740,20 @@ public class Settings implements WorldSettings { public void setOnLeaveResetAdvancements(boolean onLeaveResetAdvancements) { this.onLeaveResetAdvancements = onLeaveResetAdvancements; } - + + /** + * @return the makeNetherPortals + */ + @Override + public boolean isMakeNetherPortals() { + return makeNetherPortals; + } + + /** + * Sets make nether portals. + * @param makeNetherPortals the make nether portals + */ + public void setMakeNetherPortals(boolean makeNetherPortals) { + this.makeNetherPortals = makeNetherPortals; + } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index d151e82..b2a23ca 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -87,6 +87,11 @@ world: # Minimum is 0 (not recommended), maximum is 100. Default is 25. # Only applies to vanilla nether spawn-radius: 32 + # This option indicates if nether portals should be linked via dimensions. + # Option will simulate vanilla portal mechanics that links portals together or creates a new portal, + # if there is not a portal in other dimension. + # Added since 1.16 + create-and-link-portals: false end: # End Nether - if this is false, the end world will not be made and access to # the end will not occur. Other plugins may still enable portal usage.