Merge remote-tracking branch 'origin/develop' into master

# Conflicts:
#	pom.xml
#	src/main/resources/addon.yml
This commit is contained in:
BONNe 2022-10-04 14:54:19 +03:00
commit 44bf473803
13 changed files with 138 additions and 50 deletions

36
pom.xml
View File

@ -54,18 +54,18 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>16</java.version>
<java.version>17</java.version>
<!-- Non-minecraft related dependencies -->
<powermock.version>2.0.9</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.17.1-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.17.1</bentobox.version>
<spigot.version>1.19-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.21.0</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.15.2</build.version>
<build.version>1.16.0</build.version>
<!-- Sonar Cloud -->
<sonar.projectKey>BentoBoxWorld_BSkyBlock</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
@ -230,7 +230,33 @@
<version>3.0.0-M5</version>
<configuration>
<argLine>
--illegal-access=permit
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.math=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens
java.base/java.util.stream=ALL-UNNAMED
--add-opens java.base/java.text=ALL-UNNAMED
--add-opens
java.base/java.util.regex=ALL-UNNAMED
--add-opens
java.base/java.nio.channels.spi=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens
java.base/java.util.concurrent=ALL-UNNAMED
--add-opens java.base/sun.nio.fs=ALL-UNNAMED
--add-opens java.base/sun.nio.cs=ALL-UNNAMED
--add-opens java.base/java.nio.file=ALL-UNNAMED
--add-opens
java.base/java.nio.charset=ALL-UNNAMED
--add-opens
java.base/java.lang.reflect=ALL-UNNAMED
--add-opens
java.logging/java.util.logging=ALL-UNNAMED
--add-opens java.base/java.lang.ref=ALL-UNNAMED
--add-opens java.base/java.util.jar=ALL-UNNAMED
--add-opens java.base/java.util.zip=ALL-UNNAMED
</argLine>
</configuration>
</plugin>

View File

@ -1,11 +1,6 @@
package world.bentobox.bskyblock;
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;
@ -21,8 +16,7 @@ import world.bentobox.bentobox.api.configuration.StoreAt;
import world.bentobox.bentobox.api.configuration.WorldSettings;
import world.bentobox.bentobox.api.flags.Flag;
import world.bentobox.bentobox.database.objects.adapters.Adapter;
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer;
import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2;
import world.bentobox.bentobox.database.objects.adapters.FlagBooleanSerializer;
/**
* All the plugin settings are here
@ -232,13 +226,12 @@ public class Settings implements WorldSettings {
@ConfigComment(" SUB-OWNER = 900")
@ConfigComment(" OWNER = 1000")
@ConfigEntry(path = "world.default-island-flags")
@Adapter(FlagSerializer.class)
private Map<Flag, Integer> defaultIslandFlags = new HashMap<>();
private Map<String, Integer> defaultIslandFlagNames = new HashMap<>();
@ConfigComment("These are the default settings for new islands")
@ConfigEntry(path = "world.default-island-settings")
@Adapter(FlagSerializer2.class)
private Map<Flag, Integer> defaultIslandSettings = new HashMap<>();
@Adapter(FlagBooleanSerializer.class)
private Map<String, Integer> defaultIslandSettingNames = 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")
@ -690,22 +683,57 @@ public class Settings implements WorldSettings {
return worldFlags;
}
/**
* @return the defaultIslandFlags
* @deprecated since 1.21
*/
@Override
public Map<Flag, Integer> getDefaultIslandFlags() {
return defaultIslandFlags;
public Map<Flag, Integer> getDefaultIslandFlags()
{
return Collections.emptyMap();
}
/**
* @return the defaultIslandSettings
* @deprecated since 1.21
*/
@Override
public Map<Flag, Integer> getDefaultIslandSettings() {
return defaultIslandSettings;
public Map<Flag, Integer> getDefaultIslandSettings()
{
return Collections.emptyMap();
}
/**
* Return map of flags ID's linked to default rank for new island.
* This is necessary so users could specify any flag names in settings file from other plugins and addons.
* Otherwise, Flag reader would mark flag as invalid and remove it.
* @since 1.21
* @return default rank settings for new islands.
*/
@Override
public Map<String, Integer> getDefaultIslandFlagNames()
{
return this.defaultIslandFlagNames;
}
/**
* Return map of flags ID's linked to default settings for new island.
* This is necessary so users could specify any flag names in settings file from other plugins and addons.
* Otherwise, Flag reader would mark flag as invalid and remove it.
* @since 1.21
* @return default settings for new islands.
*/
@Override
public Map<String, Integer> getDefaultIslandSettingNames()
{
return this.defaultIslandSettingNames;
}
/**
* @return the hidden flags
*/
@ -1097,20 +1125,29 @@ public class Settings implements WorldSettings {
this.worldFlags = worldFlags;
}
/**
* @param defaultIslandFlags the defaultIslandFlags to set
*/
public void setDefaultIslandFlags(Map<Flag, Integer> defaultIslandFlags) {
this.defaultIslandFlags = defaultIslandFlags;
}
/**
* @param defaultIslandSettings the defaultIslandSettings to set
* Sets default island flag names.
*
* @param defaultIslandFlagNames the default island flag names
*/
public void setDefaultIslandSettings(Map<Flag, Integer> defaultIslandSettings) {
this.defaultIslandSettings = defaultIslandSettings;
public void setDefaultIslandFlagNames(Map<String, Integer> defaultIslandFlagNames)
{
this.defaultIslandFlagNames = defaultIslandFlagNames;
}
/**
* Sets default island setting names.
*
* @param defaultIslandSettingNames the default island setting names
*/
public void setDefaultIslandSettingNames(Map<String, Integer> defaultIslandSettingNames)
{
this.defaultIslandSettingNames = defaultIslandSettingNames;
}
/**
* @param hiddenFlags the hidden flags to set
*/

View File

@ -23,7 +23,7 @@ public class IslandAboutCommand extends CompositeCommand {
@Override
public boolean execute(User user, String label, List<String> args) {
user.sendRawMessage("About " + getAddon().getDescription().getName() + " " + getAddon().getDescription().getVersion() + ":");
user.sendRawMessage("Copyright (c) 2017 - 2020 tastybento, Poslovitch");
user.sendRawMessage("Copyright (c) 2017 - 2022 tastybento, Poslovitch");
user.sendRawMessage("See https://www.eclipse.org/legal/epl-2.0/");
user.sendRawMessage("for license information.");
return true;

View File

@ -39,7 +39,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
public ChunkData generateChunks(World world) {
ChunkData result = createChunkData(world);
if (world.getEnvironment().equals(Environment.NORMAL) && addon.getSettings().getSeaHeight() > 0) {
result.setRegion(0, 0, 0, 16, addon.getSettings().getSeaHeight() + 1, 16, Material.WATER);
result.setRegion(0, world.getMinHeight(), 0, 16, addon.getSettings().getSeaHeight() + 1, 16, Material.WATER);
}
if (world.getEnvironment().equals(Environment.NETHER) && addon.getSettings().isNetherRoof()) {
roofChunk.forEach((k,v) -> result.setBlock(k.getBlockX(), world.getMaxHeight() + k.getBlockY(), k.getBlockZ(), v));
@ -58,7 +58,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
world.getEnvironment() == Environment.NETHER ? addon.getSettings().getDefaultNetherBiome() : addon.getSettings().getDefaultEndBiome();
for (int x = 0; x < 16; x+=4) {
for (int z = 0; z < 16; z+=4) {
for (int y = 0; y < world.getMaxHeight(); y+=4) {
for (int y = world.getMinHeight(); y < world.getMaxHeight(); y+=4) {
biomeGrid.setBiome(x, y, z, biome);
}
}

View File

@ -1,7 +1,7 @@
name: BSkyBlock
main: world.bentobox.bskyblock.BSkyBlock
version: ${version}${build.number}
api-version: 1.16.5
api-version: 1.21.0
metrics: true
icon: "OAK_SAPLING"
repository: "BentoBoxWorld/BSkyBlock"

View File

@ -0,0 +1,7 @@
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: Herzlich willkommen!
line2: "[name]"
line3: Fall nicht hin! &c<3

View File

@ -1,16 +1,10 @@
###########################################################################################
# Ceci est un fichier YAML. Soyez prudent lors de l'édition.Vérifiez vos changements dans #
# le vérificateur YAML suivant: http://yaml-online-parser.appspot.com #
###########################################################################################
meta:
authors:
- x9nico
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: "Bienvenue!"
line1: Bienvenue!
line2: "[name]"
line3: "Ne tombez pas ! &c<3"
line3: Ne tombez pas ! &c<3
meta:
authors:
- x9nico

View File

@ -1,6 +1,7 @@
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: Bem vindo(a)!
line2: "[name]"
line3: Não caia! &c<3
line1: Bem vinda!

View File

@ -0,0 +1,8 @@
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: "Bine ai venit!"
line2: "[name]"
line3: "Sa nu cazi! &c<3"

View File

@ -0,0 +1,7 @@
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: Hoş Geldin!
line2: "[name]"
line3: Aşağı Düşme! &c<3

View File

@ -0,0 +1,7 @@
---
bskyblock:
sign:
line0: "&cBSkyBlock"
line1: Chào mừng!
line2: "[Tên]"
line3: Đừng ngã xuống! &c<3

View File

@ -1,6 +1,7 @@
---
bskyblock:
sign:
line0: "&c空岛生存"
line1: "欢迎你来到这里!"
line1: 欢迎你来到这里!
line2: "[name]"
line3: "千万不要掉下去! &c<3"
line3: 千万不要掉下去! &c<3

View File

@ -1,7 +1,7 @@
name: Pladdon
main: world.bentobox.bskyblock.BSkyBlockPladdon
version: ${version}
api-version: 1.17
api-version: 1.19
description: A SkyBlock Plugin
author: tastybento
depend: