From ea3e92ea6706498f8c5c89b2d44b853b86c3fb6f Mon Sep 17 00:00:00 2001 From: BONNe Date: Thu, 10 Mar 2022 17:50:37 +0200 Subject: [PATCH 1/8] Update to 1.18 version (#126) * Update versions * Add proper min height usage --- pom.xml | 8 ++++---- .../bentobox/acidisland/world/ChunkGeneratorWorld.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 1f1065b..27bf1c0 100644 --- a/pom.xml +++ b/pom.xml @@ -58,14 +58,14 @@ 2.0.9 - 1.17-R0.1-SNAPSHOT - 1.18.0 + 1.18-R0.1-SNAPSHOT + 1.20.0 ${build.version}-SNAPSHOT -LOCAL - 1.15.2 + 1.16.0 BentoBoxWorld_AcidIsland bentobox-world @@ -366,4 +366,4 @@ - \ No newline at end of file + diff --git a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java index 69e094d..9230bc1 100644 --- a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java @@ -44,9 +44,9 @@ public class ChunkGeneratorWorld extends ChunkGenerator { public ChunkData generateChunks(World world) { ChunkData result = createChunkData(world); - int sh = seaHeight.getOrDefault(world.getEnvironment(), 0); - if (sh > 0) { - result.setRegion(0, 0, 0, 16, sh + 1, 16, Material.WATER); + int sh = seaHeight.getOrDefault(world.getEnvironment(), world.getMinHeight()); + if (sh > world.getMinHeight()) { + result.setRegion(0, world.getMinHeight(), 0, 16, sh + 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)); @@ -65,7 +65,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); } } @@ -158,4 +158,4 @@ public class ChunkGeneratorWorld extends ChunkGenerator { private void setBlock(int x, int y, int z, Material m) { roofChunk.put(new Vector(x, y, z), m); } -} \ No newline at end of file +} From 8c8c70d749fd1f07bbb75c23fcb18ed21912b11c Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 20 Mar 2022 19:43:12 +0000 Subject: [PATCH 2/8] Added ability to set the default water block Can be set to anything, but LAVA is the most likely for the nether Also reworked the nether and end islands to not assume water. https://github.com/BentoBoxWorld/AcidIsland/issues/63 --- .../world/bentobox/acidisland/AISettings.java | 33 +++++- .../acidisland/world/ChunkGeneratorWorld.java | 15 +-- src/main/resources/blueprints/end-island.blu | Bin 6119 -> 1401 bytes .../resources/blueprints/nether-island.blu | Bin 8347 -> 2789 bytes src/main/resources/config.yml | 12 +++ .../world/ChunkGeneratorWorldTest.java | 96 +++++++++++------- 6 files changed, 114 insertions(+), 42 deletions(-) diff --git a/src/main/java/world/bentobox/acidisland/AISettings.java b/src/main/java/world/bentobox/acidisland/AISettings.java index 2ec0599..872a099 100644 --- a/src/main/java/world/bentobox/acidisland/AISettings.java +++ b/src/main/java/world/bentobox/acidisland/AISettings.java @@ -9,6 +9,7 @@ import java.util.Set; import org.bukkit.Difficulty; import org.bukkit.GameMode; +import org.bukkit.Material; import org.bukkit.block.Biome; import org.bukkit.entity.EntityType; import org.bukkit.potion.PotionEffectType; @@ -206,7 +207,7 @@ public class AISettings implements WorldSettings { @ConfigComment("It is the y coordinate of the bedrock block in the schem.") @ConfigEntry(path = "world.island-height") private int islandHeight = 50; - + @ConfigComment("Use your own world generator for this world.") @ConfigComment("In this case, the plugin will not generate anything.") @ConfigEntry(path = "world.use-own-generator", experimental = true) @@ -216,6 +217,10 @@ public class AISettings implements WorldSettings { @ConfigComment("Minimum is 0, which means you are playing Skyblock!") @ConfigEntry(path = "world.sea-height") private int seaHeight = 54; + + @ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun") + @ConfigEntry(path = "world.water-block", needsReset = true) + private Material waterBlock = Material.WATER; @ConfigComment("Maximum number of islands in the world. Set to -1 or 0 for unlimited. ") @ConfigComment("If the number of islands is greater than this number, no new island will be created.") @@ -260,6 +265,10 @@ public class AISettings implements WorldSettings { @ConfigComment("Changing mid-game will cause problems!") @ConfigEntry(path = "world.nether.sea-height", needsReset = true) private int netherSeaHeight = 54; + + @ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun") + @ConfigEntry(path = "world.nether.water-block", needsReset = true) + private Material netherWaterBlock = Material.WATER; @ConfigComment("Make the nether roof, if false, there is nothing up there") @ConfigComment("Change to false if lag is a problem from the generation") @@ -294,6 +303,10 @@ public class AISettings implements WorldSettings { @ConfigComment("Changing mid-game will cause problems!") @ConfigEntry(path = "world.end.sea-height", needsReset = true) private int endSeaHeight = 54; + + @ConfigComment("Water block. This should usually stay as WATER, but may be LAVA for fun") + @ConfigEntry(path = "world.end.water-block", needsReset = true) + private Material endWaterBlock = Material.WATER; @ConfigComment("This option indicates if obsidian platform in the end should be generated") @ConfigComment("when player enters the end world.") @@ -1960,4 +1973,22 @@ public class AISettings implements WorldSettings { public void setMakeEndPortals(boolean makeEndPortals) { this.makeEndPortals = makeEndPortals; } + public Material getWaterBlock() { + return waterBlock; + } + public void setWaterBlock(Material waterBlock) { + this.waterBlock = waterBlock; + } + public Material getNetherWaterBlock() { + return netherWaterBlock; + } + public void setNetherWaterBlock(Material netherWaterBlock) { + this.netherWaterBlock = netherWaterBlock; + } + public Material getEndWaterBlock() { + return endWaterBlock; + } + public void setEndWaterBlock(Material endWaterBlock) { + this.endWaterBlock = endWaterBlock; + } } diff --git a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java index 9230bc1..620b991 100644 --- a/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java +++ b/src/main/java/world/bentobox/acidisland/world/ChunkGeneratorWorld.java @@ -27,8 +27,10 @@ public class ChunkGeneratorWorld extends ChunkGenerator { private final AcidIsland addon; private final Random rand = new Random(); - private final Map seaHeight = new EnumMap<>(Environment.class); + private final Map seaHeight = new EnumMap<>(Environment.class); private final Map roofChunk = new HashMap<>(); + + private record WorldConfig(int seaHeight, Material waterBlock) {} /** * @param addon - addon @@ -36,17 +38,18 @@ public class ChunkGeneratorWorld extends ChunkGenerator { public ChunkGeneratorWorld(AcidIsland addon) { super(); this.addon = addon; - seaHeight.put(Environment.NORMAL, addon.getSettings().getSeaHeight()); - seaHeight.put(Environment.NETHER, addon.getSettings().getNetherSeaHeight()); - seaHeight.put(Environment.THE_END, addon.getSettings().getEndSeaHeight()); + seaHeight.put(Environment.NORMAL, new WorldConfig(addon.getSettings().getSeaHeight(), addon.getSettings().getWaterBlock())); + seaHeight.put(Environment.NETHER, new WorldConfig(addon.getSettings().getNetherSeaHeight(), addon.getSettings().getNetherWaterBlock())); + seaHeight.put(Environment.THE_END, new WorldConfig(addon.getSettings().getEndSeaHeight(), addon.getSettings().getEndWaterBlock())); makeNetherRoof(); } public ChunkData generateChunks(World world) { ChunkData result = createChunkData(world); - int sh = seaHeight.getOrDefault(world.getEnvironment(), world.getMinHeight()); + WorldConfig wc = seaHeight.get(world.getEnvironment()); + int sh = wc.seaHeight(); if (sh > world.getMinHeight()) { - result.setRegion(0, world.getMinHeight(), 0, 16, sh + 1, 16, Material.WATER); + result.setRegion(0, world.getMinHeight(), 0, 16, sh + 1, 16, wc.waterBlock()); } if (world.getEnvironment().equals(Environment.NETHER) && addon.getSettings().isNetherRoof()) { roofChunk.forEach((k,v) -> result.setBlock(k.getBlockX(), world.getMaxHeight() + k.getBlockY(), k.getBlockZ(), v)); diff --git a/src/main/resources/blueprints/end-island.blu b/src/main/resources/blueprints/end-island.blu index 454b5c44365bc13d060c5915d13551b165976226..33fda34354e168e1762a5f95a15d99ed1742178c 100644 GIT binary patch delta 1354 zcmV-Q1-1I;FZl`%P)h>@6aWYa2mp(lbX1WJ8h_1PVQ->J6#XlP&(zFdt=5DOzSMM^ z?AoR_d3j+C8Fkc&6by{D-KPKj4WPJb8yIG|NYXY`@yzv}bMHNa#CO9d&(s(g)L&e% z$Rqy3Fby^jeDT=B@L}{Q{w17~`I;__f#WzARvVdE{9atP(bRl5W?nGg+z?L0E1sE8 z=YJtt@8y0DkTi|ACK$7lT%uZsk{;Y3@q_uVxO zljjaUQ`4BSAc^zo$H*OxZ^WZ3FW57G^+aE}F-Xuprs72EbH-VW_Wog}!9{7{NzmQ+ zPbV+(8C`_paYJ@Z^N^D`9|h1N$!^30pMRDD#~FBT#&yASBTtxfJo-XC8%-5guqqE9 zLFT=4zy$%fGH?J=t$HG_p3hV)okO9*fkPD%RL*fdIma*s3Y2mLm~jM{@Uk*=XCaG+ zn9>qZebJJyQHA*bS_7a|PvCOd(R%}O0@7Qf`ohg(hh*83V|l(N%y-Bui|n`WJ%6Oi zlDXV(cj4BfZnWNc8ydQ^;MG}@xd60x+jv3dzX+olgm1!T8c4j9MT6gdt7Y4RRuHb* zv)yLHcso0-eaGqZMA+y}eAdgLWnK5W@gaZP(n0I~pUK_L-EjQd7udM3jW>C?AK#7= zG|SRP6B%_M?{5;gN@K&gir7Yvzkh~fck(d&ckGUCZ&T#1KJw51o*st+?L$ppaCL7% z);-R^uX6WyvxqGi@fES*dJ2~8DddH^goTROxy?fp8%{X5q;Ry>Kvl~J!K(+si3h=H z2gyk%o@u*K&AtyTNfPIc1ws=*%||>64#(g45><7PL-;r z7*;+APCW=tJV;JEdeFI&Ie(j_hiQW~G%CqHr5S#%)L0n!?u-b+VozZ6a7Rr)2>Cia zOz2AwzYt~asdz`-czXI#`CGFlPS)_cI(nb7SDOr>?i)z?# zSHU`|>cBp}LWQKMdt3yg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Me9im$;9c3TjWQ2T)#XG^0%06lwTe8^*L5j zU3o&AW|-phcj>~bfxek7fxhzKGOgNrn}Fu&$`2!jrKy!zGuB)29RIr*}!wBClrq1u%u2X!sKDRnujdFeu^nmjV&$9ZyM=E}Im znP-~Fr`Pu_=G>_k?5HMV&j!Dhq8JUvw_Ts~dt*{)^tSlw{Ic8agf|DK{9Jq<|6Q~g z{JvEM#@2P{_WYsZIYjP;?%&~+DAI~-0qIqtkax|2ejeE5&q6<9u~T$e_0pE!2d&9t zYU+_;-of*=j~p9)v?~O15mwW@rXMA4UY@$ib}ZS}KsF#(aLQA9mgTb4L0`s`Dh2Di z{eX5aiN?L-siqNo!woa}0pGQRT8_PobcDSbWP4VLI=g~$lNbD8t}?vvIuums(upby&}j`& zyLrvs*-a_wLj6k{C7LTP+2Y!ZBpPX)w|sZ*;reDHlT3lveV)rTKe#`WGETHruu_e# z#2V}0>rfQZaI9?DO0-;62;cIekDe;NOmE-{Pc{#H6SQ`XE~3%n;Y6bQc$7rG@F1@b zRa46Qb&CdkJh$d%s>{mj=F1$jO>^H`<9nHeN5S4LER zQ}wl(#p?9?tCsqlHa6iTr}6pjA Date: Tue, 4 Oct 2022 15:07:28 +0300 Subject: [PATCH 3/8] Update to BentoBox 1.21 API --- pom.xml | 4 +- .../world/bentobox/acidisland/AISettings.java | 62 +++++++++++++------ 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index 27bf1c0..4ef69b8 100644 --- a/pom.xml +++ b/pom.xml @@ -58,8 +58,8 @@ 2.0.9 - 1.18-R0.1-SNAPSHOT - 1.20.0 + 1.19-R0.1-SNAPSHOT + 1.21.0 ${build.version}-SNAPSHOT diff --git a/src/main/java/world/bentobox/acidisland/AISettings.java b/src/main/java/world/bentobox/acidisland/AISettings.java index 872a099..60a27f8 100644 --- a/src/main/java/world/bentobox/acidisland/AISettings.java +++ b/src/main/java/world/bentobox/acidisland/AISettings.java @@ -1,11 +1,6 @@ package world.bentobox.acidisland; -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,10 +16,8 @@ import world.bentobox.bentobox.api.configuration.ConfigEntry; 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.PotionEffectListAdapter; +import world.bentobox.bentobox.database.objects.adapters.*; + /** * Settings for AcidIsland @@ -331,13 +324,12 @@ public class AISettings implements WorldSettings { @ConfigComment("The value is the minimum island rank required allowed to do the action") @ConfigComment("Ranks are: Visitor = 0, Member = 900, Owner = 1000") @ConfigEntry(path = "world.default-island-flags") - @Adapter(FlagSerializer.class) - private Map defaultIslandFlags = new HashMap<>(); + private Map defaultIslandFlagNames = new HashMap<>(); @ConfigComment("These are the default settings for new islands") @ConfigEntry(path = "world.default-island-settings") - @Adapter(FlagSerializer2.class) - private Map defaultIslandSettings = new HashMap<>(); + @Adapter(FlagBooleanSerializer.class) + private Map 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") @@ -686,20 +678,50 @@ public class AISettings implements WorldSettings { public GameMode getDefaultGameMode() { return defaultGameMode; } + + + /** + * @return the defaultIslandFlags + * @since 1.21.0 + */ + @Override + public Map getDefaultIslandFlagNames() + { + return defaultIslandFlagNames; + } + + + /** + * @return the defaultIslandSettings + * @since 1.21.0 + */ + @Override + public Map getDefaultIslandSettingNames() + { + return defaultIslandSettingNames; + } + + /** * @return the defaultIslandProtection + * @deprecated since 1.21 */ @Override public Map getDefaultIslandFlags() { - return defaultIslandFlags; + return Collections.emptyMap(); } + + /** * @return the defaultIslandSettings + * @deprecated since 1.21 */ @Override public Map getDefaultIslandSettings() { - return defaultIslandSettings; + return Collections.emptyMap(); } + + /** * @return the difficulty */ @@ -1203,14 +1225,14 @@ public class AISettings implements WorldSettings { } /** */ - public void setDefaultIslandFlags(Map defaultIslandFlags) { - this.defaultIslandFlags = defaultIslandFlags; + public void setDefaultIslandFlagNames(Map defaultIslandFlags) { + this.defaultIslandFlagNames = defaultIslandFlags; } /** * @param defaultIslandSettings the defaultIslandSettings to set */ - public void setDefaultIslandSettings(Map defaultIslandSettings) { - this.defaultIslandSettings = defaultIslandSettings; + public void setDefaultIslandSettingNames(Map defaultIslandSettings) { + this.defaultIslandSettingNames = defaultIslandSettings; } /** * @param difficulty the difficulty to set From 7241845a44405b3bffbfaa8cacd13acc4a5723ad Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:09:47 +0300 Subject: [PATCH 4/8] Update yamls --- src/main/resources/addon.yml | 2 +- src/main/resources/plugin.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index e519db3..54d64da 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: AcidIsland main: world.bentobox.acidisland.AcidIsland version: ${version}${build.number} -api-version: 1.16.5 +api-version: 1.19 metrics: true repository: "BentoBoxWorld/AcidIsland" icon: "OAK_BOAT" diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 5b59b51..afad4c3 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: Pladdon main: world.bentobox.acidisland.AcidIslandPladdon version: ${version} -api-version: 1.16 +api-version: 1.21 description: AcidIsland author: tastybento depend: From 0e3db2b6962a56accb1fbf406eb68bc8febcffcd Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:10:20 +0300 Subject: [PATCH 5/8] Update JDK --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c13f2b9..ac22f52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,11 +14,11 @@ 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@v2 with: distribution: 'adopt' - java-version: '16' + java-version: '17' - name: Cache SonarCloud packages uses: actions/cache@v2 with: From 9e21d9dc86e09b65ac1065cda20b1462182b08ba Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:19:46 +0300 Subject: [PATCH 6/8] Fix failing unit-tests (#129) * Version 1.15.2 (#118) * Add support for 1.16.5 * Fix failing unit-tests Co-authored-by: tastybento --- .../world/bentobox/acidisland/AISettingsTest.java | 12 ++++++------ .../bentobox/acidisland/world/AcidTaskTest.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/test/java/world/bentobox/acidisland/AISettingsTest.java b/src/test/java/world/bentobox/acidisland/AISettingsTest.java index d2e441a..a5c3032 100644 --- a/src/test/java/world/bentobox/acidisland/AISettingsTest.java +++ b/src/test/java/world/bentobox/acidisland/AISettingsTest.java @@ -778,21 +778,21 @@ public class AISettingsTest { } /** - * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandFlags(java.util.Map)}. + * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandFlagNames(java.util.Map)}. */ @Test public void testSetDefaultIslandFlags() { - s.setDefaultIslandFlags(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10)); - assertEquals(10, (int)s.getDefaultIslandFlags().get(Flags.ANIMAL_NATURAL_SPAWN)); + s.setDefaultIslandFlagNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10)); + assertEquals(10, (int)s.getDefaultIslandFlagNames().get(Flags.ANIMAL_NATURAL_SPAWN.getID())); } /** - * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandSettings(java.util.Map)}. + * Test method for {@link world.bentobox.acidisland.AISettings#setDefaultIslandSettingNames(java.util.Map)}. */ @Test public void testSetDefaultIslandSettings() { - s.setDefaultIslandSettings(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN, 10)); - assertEquals(10, (int)s.getDefaultIslandSettings().get(Flags.ANIMAL_NATURAL_SPAWN)); + s.setDefaultIslandSettingNames(Collections.singletonMap(Flags.ANIMAL_NATURAL_SPAWN.getID(), 10)); + assertEquals(10, (int)s.getDefaultIslandSettingNames().get(Flags.ANIMAL_NATURAL_SPAWN.getID())); } diff --git a/src/test/java/world/bentobox/acidisland/world/AcidTaskTest.java b/src/test/java/world/bentobox/acidisland/world/AcidTaskTest.java index 2745a7d..f8b300f 100644 --- a/src/test/java/world/bentobox/acidisland/world/AcidTaskTest.java +++ b/src/test/java/world/bentobox/acidisland/world/AcidTaskTest.java @@ -190,7 +190,7 @@ public class AcidTaskTest { Item e = mock(Item.class); at.applyDamage(e, 0); - verify(world, never()).playSound(any(), any(Sound.class), anyFloat(), anyFloat()); + verify(world, never()).playSound(any(Location.class), any(Sound.class), anyFloat(), anyFloat()); verify(e, never()).remove(); } @@ -213,7 +213,7 @@ public class AcidTaskTest { at.setItemsInWater(map); at.applyDamage(e, 0); - verify(world, never()).playSound(any(), any(Sound.class), anyFloat(), anyFloat()); + verify(world, never()).playSound(any(Location.class), any(Sound.class), anyFloat(), anyFloat()); verify(e, never()).remove(); assertTrue(map.isEmpty()); } From 41aa6f4d57a12d656e62f64eec767284a160ad33 Mon Sep 17 00:00:00 2001 From: BONNe Date: Tue, 4 Oct 2022 15:20:20 +0300 Subject: [PATCH 7/8] Init next AcidIsland version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ef69b8..80c1d46 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ -LOCAL - 1.16.0 + 1.17.0 BentoBoxWorld_AcidIsland bentobox-world From 1b14b0afc5fa87b50a1a0162de13a29524354e1e Mon Sep 17 00:00:00 2001 From: "gitlocalize-app[bot]" <55277160+gitlocalize-app[bot]@users.noreply.github.com> Date: Mon, 31 Oct 2022 08:27:45 +0200 Subject: [PATCH 8/8] Translate ru.yml via GitLocalize (#130) Co-authored-by: DraimCiDo --- src/main/resources/locales/ru.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/main/resources/locales/ru.yml diff --git a/src/main/resources/locales/ru.yml b/src/main/resources/locales/ru.yml new file mode 100644 index 0000000..21d88dc --- /dev/null +++ b/src/main/resources/locales/ru.yml @@ -0,0 +1,7 @@ +--- +acidisland: + sign: + line0: "&1AcidIsland" + line1: "[name]" + line2: Выживание в море! + line3: Удачной игры! &c<3