Skip to content

Commit

Permalink
Merge branch 'develop' into master
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
  • Loading branch information
BONNe committed Apr 16, 2023
2 parents 3070abe + e1121d3 commit e4a571c
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 16
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 16
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
Expand All @@ -34,4 +34,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BentoBoxWorld_CaveBlock
20 changes: 8 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.19.2-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.19.0</bentobox.version>
<spigot.version>1.19.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.23.0</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- This allows to change between versions and snapshots. -->
<build.version>1.17.0</build.version>
<build.version>1.18.0</build.version>
<build.number>-LOCAL</build.number>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
Expand Down Expand Up @@ -114,12 +114,6 @@
<version>${spigot.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>plugin-annotations</artifactId>
<version>1.2.3-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
Expand Down Expand Up @@ -189,18 +183,20 @@
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<version>3.3.0</version>
<configuration>
<show>public</show>
<failOnError>false</failOnError>
<additionalJOption>-Xdoclint:none</additionalJOption>
<!-- To compile with Java 11, this tag may be required -->
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>install</phase>
<goals>
<goal>jar</goal>
</goals>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/world/bentobox/caveblock/CaveBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ public void saveWorldSettings()
}


/**
* This addon uses the new chunk generation API for the sea bottom
*/
@Override
public boolean isUsesNewChunkGeneration()
{
return true;
}


// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
package world.bentobox.caveblock;

import org.bukkit.plugin.java.annotation.dependency.Dependency;
import org.bukkit.plugin.java.annotation.plugin.ApiVersion;
import org.bukkit.plugin.java.annotation.plugin.Plugin;

import world.bentobox.bentobox.api.addons.Addon;
import world.bentobox.bentobox.api.addons.Pladdon;


@Plugin(name = "Pladdon", version = "1.0")
@ApiVersion(ApiVersion.Target.v1_18)
@Dependency(value = "BentoBox")
public class CaveBlockPladdon extends Pladdon {

@Override
Expand Down
35 changes: 21 additions & 14 deletions src/main/java/world/bentobox/caveblock/Settings.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package world.bentobox.caveblock;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;

import org.bukkit.Difficulty;
import org.bukkit.GameMode;
Expand Down Expand Up @@ -333,7 +328,7 @@ public Map<String, Boolean> getWorldFlags()
* @return the defaultIslandFlags object.
*/
@Override
public Map<Flag, Integer> getDefaultIslandFlags()
public Map<String, Integer> getDefaultIslandFlagNames()
{
return defaultIslandFlags;
}
Expand All @@ -344,7 +339,7 @@ public Map<Flag, Integer> getDefaultIslandFlags()
* @return the defaultIslandSettings object.
*/
@Override
public Map<Flag, Integer> getDefaultIslandSettings()
public Map<String, Integer> getDefaultIslandSettingNames()
{
return defaultIslandSettings;
}
Expand Down Expand Up @@ -1179,7 +1174,7 @@ public void setWorldFlags(Map<String, Boolean> worldFlags)
* @param defaultIslandFlags the defaultIslandFlags object new value.
*
*/
public void setDefaultIslandFlags(Map<Flag, Integer> defaultIslandFlags)
public void setDefaultIslandFlags(Map<String, Integer> defaultIslandFlags)
{
this.defaultIslandFlags = defaultIslandFlags;
}
Expand All @@ -1190,7 +1185,7 @@ public void setDefaultIslandFlags(Map<Flag, Integer> defaultIslandFlags)
* @param defaultIslandSettings the defaultIslandSettings object new value.
*
*/
public void setDefaultIslandSettings(Map<Flag, Integer> defaultIslandSettings)
public void setDefaultIslandSettings(Map<String, Integer> defaultIslandSettings)
{
this.defaultIslandSettings = defaultIslandSettings;
}
Expand Down Expand Up @@ -2143,6 +2138,20 @@ public void setGenerateNaturalSurface(boolean generateNaturalSurface)
}


@Override
public Map<Flag, Integer> getDefaultIslandFlags()
{
return Collections.emptyMap();
}


@Override
public Map<Flag, Integer> getDefaultIslandSettings()
{
return Collections.emptyMap();
}


// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
Expand Down Expand Up @@ -2439,13 +2448,11 @@ public void setGenerateNaturalSurface(boolean generateNaturalSurface)
@ConfigComment(" SUB-OWNER = 900")
@ConfigComment(" OWNER = 1000")
@ConfigEntry(path = "world.default-cave-flags")
@Adapter(FlagSerializer.class)
private Map<Flag, Integer> defaultIslandFlags = new HashMap<>();
private Map<String, Integer> defaultIslandFlags = new HashMap<>();

@ConfigComment("These are the default settings for new caves")
@ConfigEntry(path = "world.default-cave-settings")
@Adapter(FlagSerializer2.class)
private Map<Flag, Integer> defaultIslandSettings = new HashMap<>();
private Map<String, Integer> defaultIslandSettings = new HashMap<>();

@ConfigComment("These settings/flags are hidden from users")
@ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings")
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/addon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CaveBlock
main: world.bentobox.caveblock.CaveBlock
version: ${version}${build.number}
api-version: 1.19.0
api-version: 1.23.0
metrics: true
repository: "BentoBoxWorld/CaveBlock"
icon: "STONE_PICKAXE"
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: BentoBox-CaveBlock
main: world.bentobox.caveblock.CaveBlockPladdon
version: ${project.version}${build.number}
api-version: "1.19"

authors: [tastybento, BONNe]
contributors: ["The BentoBoxWorld Community"]
website: https://bentobox.world
description: ${project.description}

0 comments on commit e4a571c

Please sign in to comment.