Expose BentoBox 1.16 portal generation mechanics. (#13)

BentoBoxWorld/BentoBox#1718
This commit is contained in:
BONNe 2021-03-16 21:34:37 +02:00 committed by GitHub
parent 7a32465512
commit 9f4ac86fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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.