File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
src/main/java/world/bentobox/bentobox Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 7575 <!-- Do not change unless you want different name for local builds. -->
7676 <build .number>-LOCAL</build .number>
7777 <!-- This allows to change between versions. -->
78- <build .version>3.8.1 </build .version>
78+ <build .version>3.8.2 </build .version>
7979 <sonar .organization>bentobox-world</sonar .organization>
8080 <sonar .host.url>https://sonarcloud.io</sonar .host.url>
8181 <server .jars>${project.basedir} /lib</server .jars>
Original file line number Diff line number Diff line change @@ -179,5 +179,15 @@ public void saveWorldSettings() {
179179 public boolean isUsesNewChunkGeneration () {
180180 return false ;
181181 }
182+
183+ /**
184+ * Indicates whether BentoBox should try to align island centers on a grid, or leave them free form.
185+ * Free form is used with some claim-based or player-selected island location addons.
186+ * @return true by default
187+ * @since 3.8.2
188+ */
189+ public boolean isFixIslandCenter () {
190+ return true ;
191+ }
182192
183193}
Original file line number Diff line number Diff line change 4141import com .google .gson .GsonBuilder ;
4242
4343import world .bentobox .bentobox .BentoBox ;
44+ import world .bentobox .bentobox .api .addons .GameModeAddon ;
4445import world .bentobox .bentobox .api .events .IslandBaseEvent ;
4546import world .bentobox .bentobox .api .events .island .IslandEvent ;
4647import world .bentobox .bentobox .api .events .island .IslandEvent .Reason ;
@@ -1309,7 +1310,8 @@ else if (!plugin.getSettings().isOverrideSafetyCheck()
13091310 + island .getRange () + "!\n " + "Island ID in database is " + island .getUniqueId () + ".\n "
13101311 + "Island distance in config.yml cannot be changed mid-game! Fix config.yml or clean database." );
13111312 } else {
1312- if (!plugin .getSettings ().isOverrideSafetyCheck ()) {
1313+ // Only try to fix the island center if we have to
1314+ if (!plugin .getSettings ().isOverrideSafetyCheck () && plugin .getIWM ().getAddon (island .getWorld ()).map (GameModeAddon ::isFixIslandCenter ).orElse (true )) {
13131315 // Fix island center if it is off
13141316 fixIslandCenter (island );
13151317 }
You can’t perform that action at this time.
0 commit comments