diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dc6e263..f3652fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 17 + java-version: 21 - name: Grant execute permission for gradlew run: chmod +x gradlew @@ -29,7 +29,7 @@ jobs: - name: Build with Gradle run: ./gradlew build - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: artifacts path: build/libs \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa620f6..13f77b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v1 with: - java-version: 17 + java-version: 21 - name: Grant execute permission for gradlew run: chmod +x gradlew @@ -32,7 +32,7 @@ jobs: run: ./gradlew build - name: Upload GitHub release - uses: AButler/upload-release-assets@v2.0 + uses: AButler/upload-release-assets@v3.0 with: files: 'build/libs/*.jar;!build/libs/*-sources.jar;!build/libs/*-dev.jar' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle b/build.gradle index 863a345..8dd7d01 100644 --- a/build.gradle +++ b/build.gradle @@ -25,7 +25,7 @@ dependencies { modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" // Plasmid - modImplementation "xyz.nucleoid:plasmid:0.5.102-SNAPSHOT+1.20.4" + modImplementation "xyz.nucleoid:plasmid:0.6.2+1.21.4" // modRuntime ("com.github.jellysquid3:sodium-fabric:b9c2ad3c38b16275cf2f1a81dcfb2fee1563905b") // modRuntime ("com.github.jellysquid3:phosphor-fabric:0749029a498e8f6574643285bae7aecb2eda76b8") @@ -50,7 +50,7 @@ tasks.withType(JavaCompile).configureEach { // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html // If Javadoc is generated, this must be specified in that task too. it.options.encoding = "UTF-8" - it.options.release = 17 + it.options.release = 21 } java { diff --git a/gradle.properties b/gradle.properties index cf5854e..0c969bd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20.4 -yarn_mappings=1.20.4+build.3 -loader_version=0.15.11 +minecraft_version=1.21.4 +yarn_mappings=1.21.4+build.1 +loader_version=0.16.9 # Mod Properties -mod_version=1.4.1 +mod_version=1.4.2 maven_group=fr.catcore archives_base_name=deacoudre # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.97.1+1.20.4 +fabric_version=0.110.2+1.21.4 diff --git a/src/main/java/fr/catcore/deacoudre/DeACoudre.java b/src/main/java/fr/catcore/deacoudre/DeACoudre.java index 9dea666..1044a11 100644 --- a/src/main/java/fr/catcore/deacoudre/DeACoudre.java +++ b/src/main/java/fr/catcore/deacoudre/DeACoudre.java @@ -3,7 +3,7 @@ import fr.catcore.deacoudre.game.DeACoudreConfig; import fr.catcore.deacoudre.game.DeACoudreWaiting; import net.fabricmc.api.ModInitializer; -import xyz.nucleoid.plasmid.game.GameType; +import xyz.nucleoid.plasmid.api.game.GameType; import net.minecraft.util.Identifier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -16,7 +16,7 @@ public class DeACoudre implements ModInitializer { @Override public void onInitialize() { GameType.register( - new Identifier(ID, "deacoudre"), + Identifier.of(ID, "deacoudre"), DeACoudreConfig.CODEC, DeACoudreWaiting::open ); diff --git a/src/main/java/fr/catcore/deacoudre/game/DeACoudreConfig.java b/src/main/java/fr/catcore/deacoudre/game/DeACoudreConfig.java index 4c38b00..f690155 100644 --- a/src/main/java/fr/catcore/deacoudre/game/DeACoudreConfig.java +++ b/src/main/java/fr/catcore/deacoudre/game/DeACoudreConfig.java @@ -2,21 +2,22 @@ import com.mojang.datafixers.util.Either; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import com.mojang.serialization.codecs.RecordCodecBuilder; import fr.catcore.deacoudre.game.map.DeACoudreMapConfig; import net.minecraft.util.Identifier; -import xyz.nucleoid.plasmid.game.common.config.PlayerConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import xyz.nucleoid.plasmid.api.game.common.config.WaitingLobbyConfig; public record DeACoudreConfig( Either map, - PlayerConfig playerConfig, int life, boolean concurrent) { + WaitingLobbyConfig playerConfig, int life, boolean concurrent) { - public static final Codec CODEC = RecordCodecBuilder.create(instance -> { + public static final MapCodec CODEC = RecordCodecBuilder.mapCodec(instance -> { return instance.group( Codec.either(DeACoudreMapConfig.CODEC, Identifier.CODEC).fieldOf("map").forGetter(config -> config.map), - PlayerConfig.CODEC.fieldOf("players").forGetter(config -> config.playerConfig), + WaitingLobbyConfig.CODEC.fieldOf("players").forGetter(config -> config.playerConfig), Codec.INT.optionalFieldOf("life", 3).forGetter(config -> config.life), Codec.BOOL.optionalFieldOf("concurrent", false).forGetter(config -> config.concurrent) ).apply(instance, DeACoudreConfig::new); diff --git a/src/main/java/fr/catcore/deacoudre/game/DeACoudrePool.java b/src/main/java/fr/catcore/deacoudre/game/DeACoudrePool.java index 1b8bdb4..efb653e 100644 --- a/src/main/java/fr/catcore/deacoudre/game/DeACoudrePool.java +++ b/src/main/java/fr/catcore/deacoudre/game/DeACoudrePool.java @@ -9,7 +9,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; import xyz.nucleoid.map_templates.BlockBounds; -import xyz.nucleoid.plasmid.game.GameSpace; +import xyz.nucleoid.plasmid.api.game.GameSpace; import java.util.Map; diff --git a/src/main/java/fr/catcore/deacoudre/game/DeACoudreSpawnLogic.java b/src/main/java/fr/catcore/deacoudre/game/DeACoudreSpawnLogic.java index d5ef870..75fe479 100644 --- a/src/main/java/fr/catcore/deacoudre/game/DeACoudreSpawnLogic.java +++ b/src/main/java/fr/catcore/deacoudre/game/DeACoudreSpawnLogic.java @@ -7,7 +7,9 @@ import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.world.GameMode; -import xyz.nucleoid.plasmid.game.GameSpace; +import xyz.nucleoid.plasmid.api.game.GameSpace; + +import java.util.Set; public record DeACoudreSpawnLogic(GameSpace gameSpace, ServerWorld world, DeACoudreMap map) { @@ -24,6 +26,6 @@ public void spawnPlayer(ServerPlayerEntity player, GameMode gameMode) { )); BlockPos pos = this.map.getSpawn(); - player.teleport(this.world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 0.0F, 0.0F); + player.teleport(this.world, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, Set.of(), 0.0F, 0.0F, false); } } diff --git a/src/main/java/fr/catcore/deacoudre/game/DeACoudreWaiting.java b/src/main/java/fr/catcore/deacoudre/game/DeACoudreWaiting.java index 523cec8..fe1d757 100644 --- a/src/main/java/fr/catcore/deacoudre/game/DeACoudreWaiting.java +++ b/src/main/java/fr/catcore/deacoudre/game/DeACoudreWaiting.java @@ -14,13 +14,15 @@ import xyz.nucleoid.fantasy.RuntimeWorldConfig; import xyz.nucleoid.map_templates.MapTemplate; import xyz.nucleoid.map_templates.MapTemplateSerializer; -import xyz.nucleoid.plasmid.game.*; -import xyz.nucleoid.plasmid.game.common.GameWaitingLobby; -import xyz.nucleoid.plasmid.game.event.GameActivityEvents; -import xyz.nucleoid.plasmid.game.event.GamePlayerEvents; -import xyz.nucleoid.plasmid.game.player.PlayerOffer; -import xyz.nucleoid.plasmid.game.player.PlayerOfferResult; -import xyz.nucleoid.plasmid.game.rule.GameRuleType; +import xyz.nucleoid.plasmid.api.game.*; +import xyz.nucleoid.plasmid.api.game.common.GameWaitingLobby; +import xyz.nucleoid.plasmid.api.game.event.GameActivityEvents; +import xyz.nucleoid.plasmid.api.game.event.GamePlayerEvents; +import xyz.nucleoid.plasmid.api.game.player.JoinAcceptor; +import xyz.nucleoid.plasmid.api.game.player.JoinAcceptorResult; +import xyz.nucleoid.plasmid.api.game.player.JoinOffer; +import xyz.nucleoid.plasmid.api.game.rule.GameRuleType; +import xyz.nucleoid.stimuli.event.EventResult; import xyz.nucleoid.stimuli.event.player.PlayerDeathEvent; import java.io.IOException; @@ -79,7 +81,8 @@ public static GameOpenProcedure open(GameOpenContext context) { game.listen(GameActivityEvents.REQUEST_START, waiting::requestStart); - game.listen(GamePlayerEvents.OFFER, waiting::offerPlayer); + game.listen(GamePlayerEvents.OFFER, JoinOffer::accept); + game.listen(GamePlayerEvents.ACCEPT, waiting::acceptPlayer); game.listen(PlayerDeathEvent.EVENT, waiting::onPlayerDeath); }); } @@ -93,21 +96,20 @@ private GameResult requestStart() { return GameResult.ok(); } - private PlayerOfferResult offerPlayer(PlayerOffer offer) { + private JoinAcceptorResult acceptPlayer(JoinAcceptor offer) { var spawn = this.map.getSpawn(); if (spawn == null) { - return offer.reject(Text.literal("No spawn defined on map!")); + return offer.pass(); } - return offer.accept(this.world, Vec3d.ofCenter(spawn)) - .and(() -> { - var player = offer.player(); + return offer.teleport(this.world, Vec3d.ofCenter(spawn)) + .thenRunForEach((player) -> { this.spawnLogic.spawnPlayer(player, GameMode.ADVENTURE); }); } - private ActionResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { + private EventResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { this.spawnLogic.spawnPlayer(player, GameMode.ADVENTURE); - return ActionResult.FAIL; + return EventResult.DENY; } } diff --git a/src/main/java/fr/catcore/deacoudre/game/concurrent/DeACoudreConcurrent.java b/src/main/java/fr/catcore/deacoudre/game/concurrent/DeACoudreConcurrent.java index 25ff635..837f9ed 100644 --- a/src/main/java/fr/catcore/deacoudre/game/concurrent/DeACoudreConcurrent.java +++ b/src/main/java/fr/catcore/deacoudre/game/concurrent/DeACoudreConcurrent.java @@ -17,15 +17,14 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.GameMode; import org.jetbrains.annotations.Nullable; -import xyz.nucleoid.plasmid.game.GameCloseReason; -import xyz.nucleoid.plasmid.game.GameSpace; -import xyz.nucleoid.plasmid.game.common.GlobalWidgets; -import xyz.nucleoid.plasmid.game.common.widget.SidebarWidget; -import xyz.nucleoid.plasmid.game.event.*; -import xyz.nucleoid.plasmid.game.player.PlayerOffer; -import xyz.nucleoid.plasmid.game.player.PlayerOfferResult; -import xyz.nucleoid.plasmid.game.player.PlayerSet; -import xyz.nucleoid.plasmid.game.rule.GameRuleType; +import xyz.nucleoid.plasmid.api.game.GameCloseReason; +import xyz.nucleoid.plasmid.api.game.GameSpace; +import xyz.nucleoid.plasmid.api.game.common.GlobalWidgets; +import xyz.nucleoid.plasmid.api.game.common.widget.SidebarWidget; +import xyz.nucleoid.plasmid.api.game.event.*; +import xyz.nucleoid.plasmid.api.game.player.*; +import xyz.nucleoid.plasmid.api.game.rule.GameRuleType; +import xyz.nucleoid.stimuli.event.EventResult; import xyz.nucleoid.stimuli.event.player.PlayerDamageEvent; import xyz.nucleoid.stimuli.event.player.PlayerDeathEvent; @@ -65,7 +64,7 @@ public static void open(GameSpace gameSpace, ServerWorld world, DeACoudreMap map gameSpace.setActivity(game -> { GlobalWidgets widgets = GlobalWidgets.addTo(game); - Set jumpers = Sets.newHashSet(gameSpace.getPlayers()); + Set jumpers = Sets.newHashSet(gameSpace.getPlayers().participants()); DeACoudreConcurrent active = new DeACoudreConcurrent(gameSpace, world, map, jumpers, widgets); game.deny(GameRuleType.CRAFTING); @@ -78,7 +77,8 @@ public static void open(GameSpace gameSpace, ServerWorld world, DeACoudreMap map game.listen(GameActivityEvents.ENABLE, active::onOpen); game.listen(GameActivityEvents.TICK, active::tick); - game.listen(GamePlayerEvents.OFFER, active::offerPlayer); + game.listen(GamePlayerEvents.ACCEPT, active::offerPlayer); + game.listen(GamePlayerEvents.OFFER, JoinOffer::acceptSpectators); game.listen(GamePlayerEvents.LEAVE, active::removePlayer); @@ -92,28 +92,31 @@ private void onOpen() { this.spawnJumper(player); } + for (ServerPlayerEntity player : this.gameSpace.getPlayers().spectators()) { + this.spawnSpectator(player); + } + this.updateSidebar(); } - private PlayerOfferResult offerPlayer(PlayerOffer offer) { - return offer.accept(this.world, Vec3d.ofCenter(this.gameMap.getSpawn())) - .and(() -> { - var player = offer.player(); - if (!this.jumpers.contains(player)) { + private JoinAcceptorResult offerPlayer(JoinAcceptor offer) { + return offer.teleport(this.world, Vec3d.ofCenter(this.gameMap.getSpawn())) + .thenRunForEach((player, intent) -> { + if (!this.jumpers.contains(player) || intent == JoinIntent.SPECTATE) { this.spawnSpectator(player); } }); } - private ActionResult onPlayerDamage(ServerPlayerEntity player, DamageSource source, float amount) { - if (player == null) return ActionResult.FAIL; + private EventResult onPlayerDamage(ServerPlayerEntity player, DamageSource source, float amount) { + if (player == null) return EventResult.DENY; if (source.isOf(DamageTypes.OUT_OF_WORLD) || source.isOf(DamageTypes.FALL)) { this.onPlayerFailJump(player); - return ActionResult.FAIL; + return EventResult.DENY; } - return ActionResult.FAIL; + return EventResult.DENY; } private void onPlayerFailJump(ServerPlayerEntity player) { @@ -143,9 +146,9 @@ private void onPlayerLandInWater(ServerPlayerEntity player) { } } - private ActionResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { + private EventResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { this.spawnJumper(player); - return ActionResult.FAIL; + return EventResult.DENY; } private void removePlayer(ServerPlayerEntity player) { @@ -182,7 +185,7 @@ private void spawnSpectator(ServerPlayerEntity player) { private void spawnJumper(ServerPlayerEntity jumper) { Vec3d platformSpawn = this.gameMap.getJumpingPlatform().center(); - jumper.teleport(this.world, platformSpawn.x, platformSpawn.y, platformSpawn.z, 180F, 0F); + jumper.teleport(this.world, platformSpawn.x, platformSpawn.y, platformSpawn.z, Set.of(), 180F, 0F, false); jumper.fallDistance = 0.0F; } diff --git a/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMap.java b/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMap.java index 27706b0..de31f15 100644 --- a/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMap.java +++ b/src/main/java/fr/catcore/deacoudre/game/map/DeACoudreMap.java @@ -7,7 +7,7 @@ import xyz.nucleoid.map_templates.BlockBounds; import xyz.nucleoid.map_templates.MapTemplate; import xyz.nucleoid.map_templates.MapTemplateMetadata; -import xyz.nucleoid.plasmid.game.world.generator.TemplateChunkGenerator; +import xyz.nucleoid.plasmid.api.game.world.generator.TemplateChunkGenerator; public class DeACoudreMap { private final MapTemplate template; diff --git a/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequential.java b/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequential.java index 18cc38e..0cd633e 100644 --- a/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequential.java +++ b/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequential.java @@ -19,15 +19,14 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.world.GameMode; import org.jetbrains.annotations.Nullable; -import xyz.nucleoid.plasmid.game.GameCloseReason; -import xyz.nucleoid.plasmid.game.GameSpace; -import xyz.nucleoid.plasmid.game.common.GlobalWidgets; -import xyz.nucleoid.plasmid.game.event.GameActivityEvents; -import xyz.nucleoid.plasmid.game.event.GamePlayerEvents; -import xyz.nucleoid.plasmid.game.player.PlayerOffer; -import xyz.nucleoid.plasmid.game.player.PlayerOfferResult; -import xyz.nucleoid.plasmid.game.player.PlayerSet; -import xyz.nucleoid.plasmid.game.rule.GameRuleType; +import xyz.nucleoid.plasmid.api.game.GameCloseReason; +import xyz.nucleoid.plasmid.api.game.GameSpace; +import xyz.nucleoid.plasmid.api.game.common.GlobalWidgets; +import xyz.nucleoid.plasmid.api.game.event.GameActivityEvents; +import xyz.nucleoid.plasmid.api.game.event.GamePlayerEvents; +import xyz.nucleoid.plasmid.api.game.player.*; +import xyz.nucleoid.plasmid.api.game.rule.GameRuleType; +import xyz.nucleoid.stimuli.event.EventResult; import xyz.nucleoid.stimuli.event.player.PlayerDamageEvent; import xyz.nucleoid.stimuli.event.player.PlayerDeathEvent; @@ -94,7 +93,7 @@ public static void open(GameSpace gameSpace, ServerWorld world, DeACoudreMap ma gameSpace.setActivity(game -> { var widgets = GlobalWidgets.addTo(game); - Set participants = Sets.newHashSet(gameSpace.getPlayers()); + Set participants = Sets.newHashSet(gameSpace.getPlayers().participants()); var active = new DeACoudreSequential(gameSpace, world, map, config, participants, widgets); game.deny(GameRuleType.CRAFTING); @@ -107,8 +106,11 @@ public static void open(GameSpace gameSpace, ServerWorld world, DeACoudreMap ma game.listen(GameActivityEvents.ENABLE, active::onOpen); game.listen(GameActivityEvents.DISABLE, active::onClose); game.listen(GameActivityEvents.TICK, active::tick); + game.listen(GameActivityEvents.STATE_UPDATE, state -> state.canPlay(false)); - game.listen(GamePlayerEvents.OFFER, active::offerPlayer); + + game.listen(GamePlayerEvents.OFFER, JoinOffer::acceptSpectators); + game.listen(GamePlayerEvents.ACCEPT, active::offerPlayer); game.listen(GamePlayerEvents.LEAVE, active::eliminatePlayer); @@ -139,28 +141,27 @@ private void onClose() { this.scoreboard.close(); } - private PlayerOfferResult offerPlayer(PlayerOffer offer) { - return offer.accept(this.world, Vec3d.ofCenter(this.gameMap.getSpawn())) - .and(() -> { - var player = offer.player(); - if (!this.participants.contains(player)) { + private JoinAcceptorResult offerPlayer(JoinAcceptor offer) { + return offer.teleport(this.world, Vec3d.ofCenter(this.gameMap.getSpawn())) + .thenRunForEach((player, intent) -> { + if (!this.participants.contains(player) || intent == JoinIntent.SPECTATE) { this.spawnSpectator(player); } }); } - private ActionResult onPlayerDamage(ServerPlayerEntity player, DamageSource source, float amount) { - if (player == null) return ActionResult.FAIL; + private EventResult onPlayerDamage(ServerPlayerEntity player, DamageSource source, float amount) { + if (player == null) return EventResult.DENY; if (player == this.currentJumper) { if (source.isOf(DamageTypes.OUT_OF_WORLD) || source.isOf(DamageTypes.FALL)) { this.onPlayerFailJump(player); } } else { - return ActionResult.PASS; + return EventResult.PASS; } - return ActionResult.FAIL; + return EventResult.DENY; } private void onPlayerFailJump(ServerPlayerEntity player) { @@ -219,9 +220,9 @@ private void nextJumper() { this.jumpingTicks = 0; } - private ActionResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { + private EventResult onPlayerDeath(ServerPlayerEntity player, DamageSource source) { this.eliminatePlayer(player); - return ActionResult.FAIL; + return EventResult.DENY; } private void eliminatePlayer(ServerPlayerEntity player) { @@ -325,10 +326,10 @@ private void spawnSpectator(ServerPlayerEntity player) { private void spawnJumper(ServerPlayerEntity jumper) { Vec3d platformSpawn = this.gameMap.getJumpingPlatform().center(); - jumper.teleport(this.world, platformSpawn.x, platformSpawn.y, platformSpawn.z, 180F, 0F); + jumper.teleport(this.world, platformSpawn.x, platformSpawn.y, platformSpawn.z, Set.of(), 180F, 0F, false); jumper.fallDistance = 0.0F; - jumper.playSound(SoundEvents.BLOCK_BELL_USE, SoundCategory.MASTER, 1.0F, 1.0F); + jumper.playSoundToPlayer(SoundEvents.BLOCK_BELL_USE, SoundCategory.MASTER, 1.0F, 1.0F); this.gameSpace.getPlayers().sendMessage(Text.translatable("text.dac.game.turn", jumper.getDisplayName()).formatted(Formatting.BLUE)); } diff --git a/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequentialScoreboard.java b/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequentialScoreboard.java index 85c99ce..6b916f3 100644 --- a/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequentialScoreboard.java +++ b/src/main/java/fr/catcore/deacoudre/game/sequential/DeACoudreSequentialScoreboard.java @@ -9,8 +9,8 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.Text; import net.minecraft.util.Formatting; -import xyz.nucleoid.plasmid.game.common.GlobalWidgets; -import xyz.nucleoid.plasmid.game.common.widget.SidebarWidget; +import xyz.nucleoid.plasmid.api.game.common.GlobalWidgets; +import xyz.nucleoid.plasmid.api.game.common.widget.SidebarWidget; import java.util.Collection; @@ -36,12 +36,10 @@ public static DeACoudreSequentialScoreboard create(DeACoudreSequential game, Glo Text title = Text.literal("Dé à Coudre").formatted(Formatting.BLUE, Formatting.BOLD); SidebarWidget sidebar = widgets.addSidebar(title); - ScoreboardObjective scoreboardObjective2 = new ScoreboardObjective( - scoreboard, "de_a_coudre_life", + var scoreboardObjective2 = scoreboard.addObjective("de_a_coudre_life", ScoreboardCriterion.DUMMY, title, ScoreboardCriterion.RenderType.INTEGER, false, null); - scoreboard.addScoreboardObjective(scoreboardObjective2); scoreboard.setObjectiveSlot(ScoreboardDisplaySlot.LIST, scoreboardObjective2); diff --git a/src/main/resources/data/deacoudre/games/circle_deacoudre.json b/src/main/resources/data/deacoudre/plasmid/game/circle_deacoudre.json similarity index 100% rename from src/main/resources/data/deacoudre/games/circle_deacoudre.json rename to src/main/resources/data/deacoudre/plasmid/game/circle_deacoudre.json diff --git a/src/main/resources/data/deacoudre/games/circle_deacoudre_chaotic.json b/src/main/resources/data/deacoudre/plasmid/game/circle_deacoudre_chaotic.json similarity index 100% rename from src/main/resources/data/deacoudre/games/circle_deacoudre_chaotic.json rename to src/main/resources/data/deacoudre/plasmid/game/circle_deacoudre_chaotic.json diff --git a/src/main/resources/data/deacoudre/games/donut_deacoudre.json b/src/main/resources/data/deacoudre/plasmid/game/donut_deacoudre.json similarity index 100% rename from src/main/resources/data/deacoudre/games/donut_deacoudre.json rename to src/main/resources/data/deacoudre/plasmid/game/donut_deacoudre.json diff --git a/src/main/resources/data/deacoudre/games/donut_deacoudre_chaotic.json b/src/main/resources/data/deacoudre/plasmid/game/donut_deacoudre_chaotic.json similarity index 100% rename from src/main/resources/data/deacoudre/games/donut_deacoudre_chaotic.json rename to src/main/resources/data/deacoudre/plasmid/game/donut_deacoudre_chaotic.json diff --git a/src/main/resources/data/deacoudre/games/square_deacoudre.json b/src/main/resources/data/deacoudre/plasmid/game/square_deacoudre.json similarity index 100% rename from src/main/resources/data/deacoudre/games/square_deacoudre.json rename to src/main/resources/data/deacoudre/plasmid/game/square_deacoudre.json diff --git a/src/main/resources/data/deacoudre/games/square_deacoudre_chaotic.json b/src/main/resources/data/deacoudre/plasmid/game/square_deacoudre_chaotic.json similarity index 100% rename from src/main/resources/data/deacoudre/games/square_deacoudre_chaotic.json rename to src/main/resources/data/deacoudre/plasmid/game/square_deacoudre_chaotic.json