diff --git a/LICENSE b/LICENSE index e83fa28ea..6f7f4ab0c 100644 --- a/LICENSE +++ b/LICENSE @@ -633,7 +633,7 @@ the "copyright" line and a pointer to where the full notice is found. OpenMC PluginV2 is used for the OpenMC Minecraft server created by Aywen. - Copyright (C) 2025 OpenMC + Copyright (C) 2026 OpenMC This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - OpenMC - PluginV2 Copyright (C) 2025 OpenMC + OpenMC - PluginV2 Copyright (C) 2026 OpenMC This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/src/main/java/fr/openmc/api/omcplayer/OMCOfflinePlayer.java b/src/main/java/fr/openmc/api/omcplayer/OMCOfflinePlayer.java index 37bf1c105..713e7de36 100644 --- a/src/main/java/fr/openmc/api/omcplayer/OMCOfflinePlayer.java +++ b/src/main/java/fr/openmc/api/omcplayer/OMCOfflinePlayer.java @@ -12,11 +12,13 @@ @SuppressWarnings({"unused", "removal", "deprecation"}) public interface OMCOfflinePlayer extends OfflinePlayer { static OMCOfflinePlayer of(UUID playerUUID) { + if (playerUUID == null) return null; OfflinePlayer offlinePlayer = CacheOfflinePlayer.getOfflinePlayer(playerUUID); return new OMCOfflinePlayerImpl(offlinePlayer); } static OMCOfflinePlayer of(String playerName) { + if (playerName == null) return null; OfflinePlayer offlinePlayer = CacheOfflinePlayer.getOfflinePlayer(playerName); return new OMCOfflinePlayerImpl(offlinePlayer); } diff --git a/src/main/java/fr/openmc/api/omcplayer/OMCPlayerImpl.java b/src/main/java/fr/openmc/api/omcplayer/OMCPlayerImpl.java index 03d624ddd..b733aaaea 100644 --- a/src/main/java/fr/openmc/api/omcplayer/OMCPlayerImpl.java +++ b/src/main/java/fr/openmc/api/omcplayer/OMCPlayerImpl.java @@ -68,6 +68,10 @@ static OMCPlayer of(UUID playerUUID) { @Override public @Nullable CraftPlayer getCraftPlayer() { + if (player == null) return null; + if (player instanceof OMCPlayer omcPlayer) + return omcPlayer.getCraftPlayer(); + return (CraftPlayer) player; } diff --git a/src/main/java/fr/openmc/api/omcplayer/sub/OMCPlayerCity.java b/src/main/java/fr/openmc/api/omcplayer/sub/OMCPlayerCity.java index dec40daec..733eb9381 100644 --- a/src/main/java/fr/openmc/api/omcplayer/sub/OMCPlayerCity.java +++ b/src/main/java/fr/openmc/api/omcplayer/sub/OMCPlayerCity.java @@ -12,7 +12,7 @@ public OMCPlayerCity(Player player) { @Nullable public City getCity() { - return CityManager.getCity(getUniqueId()); + return CityManager.getPlayerCity(getUniqueId()); } public boolean hasCity() { diff --git a/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeListener.java b/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeListener.java index 4ba6e73af..6be67e37a 100644 --- a/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeListener.java +++ b/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeListener.java @@ -1,6 +1,8 @@ package fr.openmc.core.features.chatanimations.contents.challenge; import com.destroystokyo.paper.event.player.PlayerJumpEvent; +import dev.lone.itemsadder.api.Events.CustomBlockBreakEvent; +import dev.lone.itemsadder.api.Events.CustomBlockPlaceEvent; import fr.openmc.core.features.chatanimations.ChatAnimation; import fr.openmc.core.features.chatanimations.ChatAnimationManager; import fr.openmc.core.features.chatanimations.contents.challenge.types.*; @@ -32,6 +34,22 @@ public void onBlockBreak(BlockBreakEvent event) { animation.complete(winner); } } + @EventHandler + public void onCustomBlockBreak(CustomBlockBreakEvent event) { + ChatAnimation animation = ChatAnimationManager.getActive(); + if (animation == null) return; + if (!(animation instanceof MineBlocksChallenge challenge)) return; + if (animation.isFinished()) return; + if (!challenge.getKeyBlock().matches(event.getBlock())) return; + + Player player = event.getPlayer(); + int count = challenge.getProgress().merge(player.getUniqueId(), 1, Integer::sum); + + if (count >= challenge.getTarget()) { + Player winner = event.getPlayer(); + animation.complete(winner); + } + } @EventHandler public void onJump(PlayerJumpEvent event) { @@ -125,6 +143,22 @@ public void onBlockPlace(BlockPlaceEvent event) { } } + @EventHandler + public void onCustomBlockPlace(CustomBlockPlaceEvent event) { + ChatAnimation animation = ChatAnimationManager.getActive(); + if (animation == null) return; + if (!(animation instanceof PlaceBlocksChallenge challenge)) return; + if (animation.isFinished()) return; + if (!challenge.getKeyBlock().matches(event.getBlock())) return; + + Player player = event.getPlayer(); + int count = challenge.getProgress().merge(player.getUniqueId(), 1, Integer::sum); + + if (count >= challenge.getTarget()) { + animation.complete(player); + } + } + @EventHandler public void onPlayerMove(PlayerMoveEvent event) { if (event.getFrom().distanceSquared(event.getTo()) == 0) return; diff --git a/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeLootTable.java b/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeLootTable.java index bf40732da..41f203401 100644 --- a/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeLootTable.java +++ b/src/main/java/fr/openmc/core/features/chatanimations/contents/challenge/ChallengeLootTable.java @@ -30,8 +30,8 @@ public Set getLoots() { new MoneyLoot(200, 450, 1), new ItemLoot(OMCRegistry.CUSTOM_ITEMS.CONTEST_SHELL, (player) -> WeeklyEventsManager.isEventActive() - && WeeklyEventsManager.getCurrentEvent() instanceof Contest contest - && ContestPhase.TRADE_PHASE.getPhase().equals(contest.getActivePhase()), + && WeeklyEventsManager.getCurrentEvent() instanceof Contest + && ContestPhase.TRADE_PHASE.getPhase() == WeeklyEventsManager.getCurrentPhase(), 1, 100 ) diff --git a/src/main/java/fr/openmc/core/features/chatanimations/contents/quizz/QuizzLootTable.java b/src/main/java/fr/openmc/core/features/chatanimations/contents/quizz/QuizzLootTable.java index 7a6f7a0b4..b8d4c7a3e 100644 --- a/src/main/java/fr/openmc/core/features/chatanimations/contents/quizz/QuizzLootTable.java +++ b/src/main/java/fr/openmc/core/features/chatanimations/contents/quizz/QuizzLootTable.java @@ -30,8 +30,8 @@ public Set getLoots() { new MoneyLoot(100, 300, 1), new ItemLoot(OMCRegistry.CUSTOM_ITEMS.CONTEST_SHELL, (player) -> WeeklyEventsManager.isEventActive() - && WeeklyEventsManager.getCurrentEvent() instanceof Contest contest - && ContestPhase.TRADE_PHASE.getPhase().equals(contest.getActivePhase()), + && WeeklyEventsManager.getCurrentEvent() instanceof Contest + && ContestPhase.TRADE_PHASE.getPhase() == WeeklyEventsManager.getCurrentPhase(), 1, 50 ) diff --git a/src/main/java/fr/openmc/core/features/city/menu/main/buttons/ManageButton.java b/src/main/java/fr/openmc/core/features/city/menu/main/buttons/ManageButton.java index 37fd666ae..95abb622d 100644 --- a/src/main/java/fr/openmc/core/features/city/menu/main/buttons/ManageButton.java +++ b/src/main/java/fr/openmc/core/features/city/menu/main/buttons/ManageButton.java @@ -8,7 +8,6 @@ import fr.openmc.core.features.city.CityPermission; import fr.openmc.core.features.city.menu.CityModifyMenu; import fr.openmc.core.features.city.sub.milestone.rewards.MemberLimitRewards; -import fr.openmc.core.utils.cache.CachePlayerName; import fr.openmc.core.utils.text.messages.MessageType; import fr.openmc.core.utils.text.messages.MessagesManager; import fr.openmc.core.utils.text.messages.Prefix; @@ -36,7 +35,7 @@ public static void init(Menu menu, Map contents, City )); itemMeta.lore(getDynamicLore(city, player)); itemMeta.setItemModel(NamespacedKey.minecraft("air")); - }).setOnClick(inventoryClickEvent -> { + }).setOnClick(_ -> { City cityCheck = CityManager.getPlayerCity(player.getUniqueId()); if (cityCheck == null) { MessagesManager.sendMessage(player, TranslationManager.translation("messages.city.player_no_in_city"), Prefix.CITY, MessageType.ERROR, false); @@ -53,7 +52,7 @@ private static List getDynamicLore(City city, Player player) { boolean hasPermissionRenameCity = city.hasPermission(player.getUniqueId(), CityPermission.RENAME); boolean hasPermissionOwner = city.hasPermission(player.getUniqueId(), CityPermission.OWNER); - Component mayorName = (city.getMayor() != null && city.getMayor().getName() != null) + Component mayorName = (city.getMayor() != null && city.getMayor().getOMCOfflinePlayer() != null) ? city.getMayor().getOMCOfflinePlayer().getNameWithHead() : TranslationManager.translation("messages.menus.none"); NamedTextColor mayorColor = (city.getMayor() != null && city.getMayor().getName() != null) ? city.getMayor().getMayorColor() : NamedTextColor.DARK_GRAY; diff --git a/src/main/java/fr/openmc/core/features/city/menu/main/buttons/MayorButton.java b/src/main/java/fr/openmc/core/features/city/menu/main/buttons/MayorButton.java index b2baa2775..066d8b860 100644 --- a/src/main/java/fr/openmc/core/features/city/menu/main/buttons/MayorButton.java +++ b/src/main/java/fr/openmc/core/features/city/menu/main/buttons/MayorButton.java @@ -45,7 +45,7 @@ private static Supplier getItemSupplier(Menu menu, City city, P private static List getDynamicLore(City city, Player player) { boolean hasPermissionOwner = city.hasPermission(player.getUniqueId(), CityPermission.OWNER); - Component mayorName = (city.getMayor() != null && city.getMayor().getName() != null) + Component mayorName = (city.getMayor() != null && city.getMayor().getOMCOfflinePlayer() != null) ? city.getMayor().getOMCOfflinePlayer().getNameWithHead() : TranslationManager.translation("messages.menus.none"); NamedTextColor mayorColor = (city.getMayor() != null && city.getMayor().getName() != null) ? city.getMayor().getMayorColor() : NamedTextColor.DARK_GRAY; diff --git a/src/main/java/fr/openmc/core/features/dream/models/registry/DreamMob.java b/src/main/java/fr/openmc/core/features/dream/models/registry/DreamMob.java index db44c2f36..8cbe8a084 100644 --- a/src/main/java/fr/openmc/core/features/dream/models/registry/DreamMob.java +++ b/src/main/java/fr/openmc/core/features/dream/models/registry/DreamMob.java @@ -1,5 +1,6 @@ package fr.openmc.core.features.dream.models.registry; +import fr.openmc.core.registry.loottable.CustomLootTable; import fr.openmc.core.registry.loottable.loots.CustomLoot; import fr.openmc.core.registry.mobs.CustomMob; import fr.openmc.core.registry.mobs.CustomMobAttribute; @@ -20,6 +21,12 @@ public DreamMob(String id, Component name, Class entityClass, double health, this.damageTime = damageTime; } + public DreamMob(String id, Component name, Class entityClass, double health, Long damageTime, double speed, double scale, CustomLootTable loots) { + super(id, name, entityClass, health, 0f, speed, loots, + new CustomMobAttribute(Attribute.SCALE, scale)); + this.damageTime = damageTime; + } + public DreamMob(String id, Component name, Class entityClass, double health, Long damageTime, double speed, double scale, List loots) { super(id, name, entityClass, health, 0f, speed, loots, new CustomMobAttribute(Attribute.SCALE, scale)); diff --git a/src/main/java/fr/openmc/core/features/economy/commands/BankCommands.java b/src/main/java/fr/openmc/core/features/economy/commands/BankCommands.java index 7822ab301..48cc32bd1 100644 --- a/src/main/java/fr/openmc/core/features/economy/commands/BankCommands.java +++ b/src/main/java/fr/openmc/core/features/economy/commands/BankCommands.java @@ -19,7 +19,7 @@ public class BankCommands { @CommandPlaceholder() @Description("Ouvre le menu de votre banque personelle") public static void openBankMenu(OMCPlayer player) { - if (player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { + if (!player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { player.message().sendError( TranslationManager.translation( "feature.economy.bank.command.not_unlocked", @@ -39,7 +39,7 @@ void deposit( OMCPlayer player, @Named("montant") String input ) { - if (player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { + if (!player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { player.message().sendError( TranslationManager.translation( "feature.economy.bank.command.not_unlocked", @@ -59,7 +59,7 @@ void withdraw( OMCPlayer player, @Named("montant") String input ) { - if (player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { + if (!player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { player.message().sendError( TranslationManager.translation( "feature.economy.bank.command.not_unlocked", @@ -75,12 +75,13 @@ void withdraw( @Subcommand({"balance", "bal"}) void withdraw(OMCPlayer player) { - if (player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { + if (!player.city().hasCity() || !FeaturesRewards.hasUnlockFeature(player.city().getCity(), FeaturesRewards.Feature.PLAYER_BANK)) { player.message().sendError( TranslationManager.translation( "feature.economy.bank.command.not_unlocked", Component.text(FeaturesRewards.getFeatureUnlockLevel(FeaturesRewards.Feature.PLAYER_BANK)).color(NamedTextColor.YELLOW) ), Prefix.CITY); + return; } double balance = BankManager.getBankBalance(player.getUniqueId()); diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/VampireLootTable.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/VampireLootTable.java index 36f85e274..5657668fd 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/VampireLootTable.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/VampireLootTable.java @@ -7,6 +7,8 @@ import fr.openmc.core.utils.text.messages.TranslationManager; import net.kyori.adventure.text.Component; import org.bukkit.inventory.ItemType; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import java.util.LinkedHashSet; import java.util.List; @@ -26,10 +28,12 @@ public String getNamespace() { @Override public Set getLoots() { return new LinkedHashSet<>(List.of( - new ItemLoot(OMCRegistry.CUSTOM_ITEMS.AYWENITE_BLOCK,1, 1, 10), + new ItemLoot(OMCRegistry.CUSTOM_ITEMS.AYWENITE_BLOCK,1, 7, 15), new ItemLoot(ItemType.OMINOUS_BOTTLE.createItemStack( o -> o.setAmplifier(4)),0.7, 1), - new ItemLoot(OMCRegistry.CUSTOM_ITEMS.VAMPIRE_HEAD,0.50, 1), + new ItemLoot(ItemType.SPLASH_POTION.createItemStack(p -> + p.addCustomEffect(new PotionEffect(PotionEffectType.INSTANT_HEALTH, 5, 1), true)), 0.7, 1, 3), + new ItemLoot(OMCRegistry.CUSTOM_ITEMS.VAMPIRE_HEAD, 0.5, 1), new ItemLoot( OMCRegistry.CUSTOM_ENCHANTS.VAMPIRISM.getEnchantedBookItem(1, 2), 0.35, diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/bloodymob/EnragedMobLootTable.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/bloodymob/EnragedMobLootTable.java index 7768ce85e..69fe9310c 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/bloodymob/EnragedMobLootTable.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/loottable/bloodymob/EnragedMobLootTable.java @@ -8,6 +8,8 @@ import net.kyori.adventure.text.Component; import org.bukkit.Material; import org.bukkit.inventory.ItemType; +import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffectType; import java.util.LinkedHashSet; import java.util.List; @@ -31,6 +33,8 @@ public Set getLoots() { new ItemLoot(Material.IRON_BLOCK,0.23, 1), new ItemLoot(Material.GOLDEN_APPLE,0.2, 1, 2), new ItemLoot(Material.GOLD_BLOCK,0.16, 1), + new ItemLoot(ItemType.SPLASH_POTION.createItemStack(p -> + p.addCustomEffect(new PotionEffect(PotionEffectType.INSTANT_HEALTH, 5, 1), true)), 0.13, 1), new ItemLoot(ItemType.OMINOUS_BOTTLE.createItemStack(o -> o.setAmplifier(4)),0.13, 1, 2), new ItemLoot(Material.DIAMOND,0.1, 1, 2), diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/AncientMonster.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/AncientMonster.java index e4f0bf27c..5c958b049 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/AncientMonster.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/AncientMonster.java @@ -46,7 +46,7 @@ public AncientMonster(String id) { Monster.class, 3, 1, - OMCRegistry.CUSTOM_LOOT_TABLES.ANCIENT_MOB.rollLoots().loots() + OMCRegistry.CUSTOM_LOOT_TABLES.ANCIENT_MOB ); } diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CorruptedMonster.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CorruptedMonster.java index d1287067f..384cc8f19 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CorruptedMonster.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CorruptedMonster.java @@ -45,7 +45,7 @@ public CorruptedMonster(String id) { Monster.class, 1, 1, - OMCRegistry.CUSTOM_LOOT_TABLES.CORRUPTED_MOB.rollLoots().loots() + OMCRegistry.CUSTOM_LOOT_TABLES.CORRUPTED_MOB ); } diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CursedMonster.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CursedMonster.java index 9c738c9d3..74e3535f3 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CursedMonster.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/CursedMonster.java @@ -54,7 +54,7 @@ public CursedMonster(String id) { Monster.class, 1, 1, - OMCRegistry.CUSTOM_LOOT_TABLES.CURSED_MOB.rollLoots().loots() + OMCRegistry.CUSTOM_LOOT_TABLES.CURSED_MOB ); } diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/EnragedMonster.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/EnragedMonster.java index 7a0a6b5f7..6ad070fe3 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/EnragedMonster.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/bloodynight/contents/mobs/bloodytypes/EnragedMonster.java @@ -46,7 +46,7 @@ public EnragedMonster(String id) { Monster.class, 1, 1, - OMCRegistry.CUSTOM_LOOT_TABLES.ENRAGED_MOB.rollLoots().loots() + OMCRegistry.CUSTOM_LOOT_TABLES.ENRAGED_MOB ); } diff --git a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/miraculousfishing/registry/SeaCreatureLoot.java b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/miraculousfishing/registry/SeaCreatureLoot.java index cce93aad9..7600d98f5 100644 --- a/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/miraculousfishing/registry/SeaCreatureLoot.java +++ b/src/main/java/fr/openmc/core/features/events/contents/dailyevents/contents/miraculousfishing/registry/SeaCreatureLoot.java @@ -86,7 +86,7 @@ public void showLoot(Player player) { new LootsInfoMenu( player, TranslationManager.translation("feature.dailyevents.miraculousfishing.menu.loot_info.sea_creature"), - seaCreatureMob.getMob().getLoots() + seaCreatureMob.getMob().getLootTable().getLoots() ).open(); } } \ No newline at end of file diff --git a/src/main/java/fr/openmc/core/features/friend/FriendManager.java b/src/main/java/fr/openmc/core/features/friend/FriendManager.java index 901d596d3..fe58d8560 100644 --- a/src/main/java/fr/openmc/core/features/friend/FriendManager.java +++ b/src/main/java/fr/openmc/core/features/friend/FriendManager.java @@ -19,9 +19,6 @@ @Credit(developers = {"Axeno"}) public class FriendManager extends Feature implements HasDatabase, HasCommands { - // TODO: Configuration pour activer/désactiver les demandes d'amis (par défaut activé) & les messages de connexion/déconnexion - // Config: accepter que les joueurs voient l'argent, la ville, le status (En ligne, Hors ligne), le temps de jeu, ou autre - @Getter public static final List friendsRequests = new ArrayList<>(); diff --git a/src/main/java/fr/openmc/core/features/mailboxes/MailboxManager.java b/src/main/java/fr/openmc/core/features/mailboxes/MailboxManager.java index 5539ffcca..21129bf4c 100644 --- a/src/main/java/fr/openmc/core/features/mailboxes/MailboxManager.java +++ b/src/main/java/fr/openmc/core/features/mailboxes/MailboxManager.java @@ -91,10 +91,12 @@ private static boolean sendLetter(OMCPlayer sender, OMCOfflinePlayer receiver, I letters.add(letter); int id = letter.getLetterId(); - OMCPlayer receiverPlayer = OMCPlayer.of(receiver.getPlayer()) ; - if (receiverPlayer != null) { + if (receiver.isOnline()) { + OMCPlayer receiverPlayer = OMCPlayer.of(receiver.getPlayer()); + if (receiverPlayer == null) return true; Inventory inv = receiverPlayer.getInventory(); - if (inv instanceof PlayerMailbox receiverMailbox) receiverMailbox.open(); + if (inv instanceof PlayerMailbox receiverMailbox) + receiverMailbox.open(); sendLetterReceivedNotification(sender, receiverPlayer, numItems, id); } @@ -148,40 +150,6 @@ private static ItemStack[] changeStackItem(ItemStack[] items) { .toArray(ItemStack[]::new); } - public static void sendMailNotification(Player player) { - long count = letters.stream() - .filter(letter -> letter.getReceiverUUID().equals(player.getUniqueId()) && !letter.isRefused()) - .count(); - - if (count == 0) return; - - Component countLabel = count > 1 - ? Component.text(count) - : TranslationManager.translation("feature.mailboxes.message.one_letter"); - Component line1 = TranslationManager.translation( - "feature.mailboxes.message.new_letters.line1", - countLabel.color(NamedTextColor.GREEN), - pluralize(TranslationManager.translation("feature.mailboxes.letter"), count).color(NamedTextColor.DARK_GREEN) - ).color(NamedTextColor.DARK_GREEN); - Component clickComponent = TranslationManager.translation("feature.mailboxes.message.new_letters.click") - .color(NamedTextColor.YELLOW) - .clickEvent(ClickEvent.runCommand("/mailbox")) - .hoverEvent(getHoverEvent(TranslationManager.translation("feature.mailboxes.message.new_letters.hover"))); - Component line2 = clickComponent - .append(Component.space()) - .append(TranslationManager.translation("feature.mailboxes.message.new_letters.suffix") - .color(NamedTextColor.GOLD)); - Component message = line1.appendNewline().append(line2); - - MessagesManager.sendMessage( - player, - message, - Prefix.MAILBOX, - MessageType.SUCCESS, - true - ); - } - public static boolean deleteLetter(int id) { return letters.removeIf(letter -> letter.getLetterId() == id); } diff --git a/src/main/java/fr/openmc/core/features/milestones/tutorial/quests/OpenContestMenuQuest.java b/src/main/java/fr/openmc/core/features/milestones/tutorial/quests/OpenContestMenuQuest.java index 94ea2e362..b0596ff1e 100644 --- a/src/main/java/fr/openmc/core/features/milestones/tutorial/quests/OpenContestMenuQuest.java +++ b/src/main/java/fr/openmc/core/features/milestones/tutorial/quests/OpenContestMenuQuest.java @@ -8,7 +8,6 @@ import fr.openmc.core.features.milestones.quests.MilestoneQuest; import fr.openmc.core.features.milestones.tutorial.TutorialSteps; import fr.openmc.core.features.quests.objects.QuestTier; -import fr.openmc.core.features.quests.rewards.QuestItemReward; import fr.openmc.core.features.quests.rewards.QuestMethodsReward; import fr.openmc.core.features.quests.rewards.QuestMoneyReward; import fr.openmc.core.features.quests.rewards.QuestTextReward; @@ -48,18 +47,21 @@ public OpenContestMenuQuest() { Prefix.MILLESTONE, MessageType.SUCCESS ), - new QuestItemReward(OMCRegistry.CUSTOM_ITEMS.AYWENITE.getBest(), 30), new QuestMethodsReward( player -> { List items = new ArrayList<>(); + ItemStack ayweniteReward = OMCRegistry.CUSTOM_ITEMS.AYWENITE.getBest().clone(); + ayweniteReward.setAmount(30); + items.add(ayweniteReward); + FileConfiguration config = OMCPlugin.getConfigs(); if (config != null) { LocalDate today = LocalDate.now(); LocalDate limitDate = LocalDate.of( - config.getInt("features.aywen_pelush.year", 2025), + config.getInt("features.aywen_pelush.year", 2026), config.getInt("features.aywen_pelush.month", 11), - config.getInt("features.aywen_pelush.day", 3) + config.getInt("features.aywen_pelush.day", 7) ); if (!limitDate.isBefore(today)) { diff --git a/src/main/java/fr/openmc/core/features/profile/command/ProfileCommand.java b/src/main/java/fr/openmc/core/features/profile/command/ProfileCommand.java index 548163313..ddc01c016 100644 --- a/src/main/java/fr/openmc/core/features/profile/command/ProfileCommand.java +++ b/src/main/java/fr/openmc/core/features/profile/command/ProfileCommand.java @@ -5,17 +5,9 @@ import fr.openmc.core.commands.autocomplete.OnlinePlayerAutoComplete; import fr.openmc.core.features.profile.menu.ProfileMenu; import fr.openmc.core.utils.text.messages.MessageType; -import fr.openmc.core.utils.text.messages.MessagesManager; import fr.openmc.core.utils.text.messages.Prefix; import fr.openmc.core.utils.text.messages.TranslationManager; -import org.bukkit.OfflinePlayer; -import org.bukkit.entity.Player; -import revxrsal.commands.annotation.Command; -import revxrsal.commands.annotation.CommandPlaceholder; -import revxrsal.commands.annotation.Description; -import revxrsal.commands.annotation.Named; -import revxrsal.commands.annotation.Optional; -import revxrsal.commands.annotation.SuggestWith; +import revxrsal.commands.annotation.*; import revxrsal.commands.bukkit.annotation.CommandPermission; @Command({"profile", "profil"}) @@ -27,7 +19,9 @@ public void openProfile( OMCPlayer player, @Named("joueur") @Optional @SuggestWith(OnlinePlayerAutoComplete.class) OMCOfflinePlayer target ) { - if (!target.isConnected() && !target.hasPlayedBefore()) { + OMCOfflinePlayer targetPlayer = target == null ? player : target; + + if (!targetPlayer.isConnected() && !targetPlayer.hasPlayedBefore()) { player.message().send( TranslationManager.translation("feature.profile.message.player_not_found"), Prefix.OPENMC, @@ -37,6 +31,6 @@ public void openProfile( return; } - new ProfileMenu(player, target).open(); + new ProfileMenu(player, targetPlayer).open(); } } diff --git a/src/main/java/fr/openmc/core/features/tpa/TPAManager.java b/src/main/java/fr/openmc/core/features/tpa/TPAManager.java index e056cd47d..37bf70f23 100644 --- a/src/main/java/fr/openmc/core/features/tpa/TPAManager.java +++ b/src/main/java/fr/openmc/core/features/tpa/TPAManager.java @@ -9,13 +9,9 @@ import fr.openmc.core.features.tpa.commands.TPADenyCommand; import fr.openmc.core.features.tpa.commands.TPAcceptCommand; import fr.openmc.core.utils.text.messages.MessageType; -import fr.openmc.core.utils.text.messages.MessagesManager; import fr.openmc.core.utils.text.messages.Prefix; import fr.openmc.core.utils.text.messages.TranslationManager; -import net.kyori.adventure.text.Component; import net.kyori.adventure.text.format.NamedTextColor; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; import java.util.ArrayList; import java.util.List; @@ -118,7 +114,12 @@ public static void expireRequest(OMCPlayer player, OMCPlayer target) { */ public static List getRequesters(OMCPlayer target) { List requesters = new ArrayList<>(); - for (UUID playerUUID : tpaRequests.get(target.getUniqueId())) { + + if (!tpaRequests.containsKey(target.getUniqueId())) + return List.of(); + + List requestersUUID = tpaRequests.get(target.getUniqueId()); + for (UUID playerUUID : requestersUUID) { requesters.add(OMCPlayer.of(playerUUID)); } return requesters; diff --git a/src/main/java/fr/openmc/core/hooks/itemsadder/ItemsAdderHook.java b/src/main/java/fr/openmc/core/hooks/itemsadder/ItemsAdderHook.java index 2c39ce5fd..3716709f5 100644 --- a/src/main/java/fr/openmc/core/hooks/itemsadder/ItemsAdderHook.java +++ b/src/main/java/fr/openmc/core/hooks/itemsadder/ItemsAdderHook.java @@ -8,7 +8,6 @@ import fr.openmc.core.hooks.itemsadder.behaviours.BehaviourUpBlock; import fr.openmc.core.hooks.itemsadder.events.IAItemLoadEvent; import fr.openmc.core.hooks.itemsadder.placeholders.IAPlaceholderRegistry; -import fr.openmc.core.hooks.itemsadder.sprite.SpriteUtils; import fr.openmc.core.utils.FilesUtils; import fr.openmc.core.utils.ZipUtils; import io.papermc.paper.plugin.bootstrap.BootstrapContext; @@ -35,7 +34,7 @@ public class ItemsAdderHook extends Hooks implements ApiHook { private static ItemsAdder api; private static final String CONTENTS_FOLDER_NAME = "contents"; - private static final String MERGE_RESOURCEPACK_PATH = "resource-pack.zip.merge_other_plugins_resourcepacks_folders"; + private static final String MERGE_RESOURCEPACK_PATH = "resource_pack.merge_other_plugins_resourcepacks_folders.list"; @Getter private static Path extractedGeneratedResourcePack; diff --git a/src/main/java/fr/openmc/core/registry/mobs/CustomMob.java b/src/main/java/fr/openmc/core/registry/mobs/CustomMob.java index 66283344e..e896aa3b7 100644 --- a/src/main/java/fr/openmc/core/registry/mobs/CustomMob.java +++ b/src/main/java/fr/openmc/core/registry/mobs/CustomMob.java @@ -1,5 +1,6 @@ package fr.openmc.core.registry.mobs; +import fr.openmc.core.registry.loottable.CustomLootTable; import fr.openmc.core.registry.loottable.loots.CustomLoot; import lombok.Getter; import net.kyori.adventure.text.Component; @@ -13,7 +14,10 @@ import org.bukkit.event.entity.EntityDeathEvent; import org.bukkit.persistence.PersistentDataType; -import java.util.*; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; @Getter public abstract class CustomMob { @@ -21,7 +25,7 @@ public abstract class CustomMob { private final Component name; private final Class entityClass; private final Set baseAttributes = new HashSet<>(); - private final List loots = new ArrayList<>(); + private CustomLootTable lootTable = null; public CustomMob(String id, Component name, Class entityClass, double health, double damage, CustomMobAttribute... baseAttributes) { this.id = id; @@ -42,6 +46,27 @@ public CustomMob(String id, Component name, Class entityClass, double health, this.baseAttributes.addAll(Arrays.stream(baseAttributes).toList()); } + public CustomMob(String id, Component name, Class entityClass, double health, double damage, double speed, CustomLootTable lootTable, CustomMobAttribute... baseAttributes) { + this.id = id; + this.name = name; + this.entityClass = entityClass; + this.baseAttributes.add(new CustomMobAttribute(Attribute.MAX_HEALTH, health)); + this.baseAttributes.add(new CustomMobAttribute(Attribute.ATTACK_DAMAGE, damage)); + this.baseAttributes.add(new CustomMobAttribute(Attribute.MOVEMENT_SPEED, speed)); + this.baseAttributes.addAll(Arrays.stream(baseAttributes).toList()); + this.lootTable = lootTable; + } + + public CustomMob(String id, Component name, Class entityClass, double health, double damage, CustomLootTable lootTable, CustomMobAttribute... baseAttributes) { + this.id = id; + this.name = name; + this.entityClass = entityClass; + this.baseAttributes.add(new CustomMobAttribute(Attribute.MAX_HEALTH, health)); + this.baseAttributes.add(new CustomMobAttribute(Attribute.ATTACK_DAMAGE, damage)); + this.baseAttributes.addAll(Arrays.stream(baseAttributes).toList()); + this.lootTable = lootTable; + } + public CustomMob(String id, Component name, Class entityClass, double health, double damage, double speed, List loots, CustomMobAttribute... baseAttributes) { this.id = id; this.name = name; @@ -50,7 +75,7 @@ public CustomMob(String id, Component name, Class entityClass, double health, this.baseAttributes.add(new CustomMobAttribute(Attribute.ATTACK_DAMAGE, damage)); this.baseAttributes.add(new CustomMobAttribute(Attribute.MOVEMENT_SPEED, speed)); this.baseAttributes.addAll(Arrays.stream(baseAttributes).toList()); - this.loots.addAll(loots); + this.lootTable = getPreBuildLootTable(loots); } public CustomMob(String id, Component name, Class entityClass, double health, double damage, List loots, CustomMobAttribute... baseAttributes) { @@ -60,7 +85,7 @@ public CustomMob(String id, Component name, Class entityClass, double health, this.baseAttributes.add(new CustomMobAttribute(Attribute.MAX_HEALTH, health)); this.baseAttributes.add(new CustomMobAttribute(Attribute.ATTACK_DAMAGE, damage)); this.baseAttributes.addAll(Arrays.stream(baseAttributes).toList()); - this.loots.addAll(loots); + this.lootTable = getPreBuildLootTable(loots); } // * peut etre Override @@ -137,4 +162,23 @@ public void registerAsCustomMob(LivingEntity entity) { public void unregisterAsCustomMob(LivingEntity entity) { entity.getPersistentDataContainer().remove(CustomMobRegistry.CUSTOM_MOB_KEY); } + + private CustomLootTable getPreBuildLootTable(List lootList) { + return new CustomLootTable() { + @Override + public Component getName() { + return Component.empty(); + } + + @Override + public String getNamespace() { + return "omc_mobs:mob"; + } + + @Override + public Set getLoots() { + return new HashSet<>(lootList); + } + }; + } } diff --git a/src/main/java/fr/openmc/core/registry/mobs/listeners/CustomMobDeathListener.java b/src/main/java/fr/openmc/core/registry/mobs/listeners/CustomMobDeathListener.java index 7267a4fff..145baa0d5 100644 --- a/src/main/java/fr/openmc/core/registry/mobs/listeners/CustomMobDeathListener.java +++ b/src/main/java/fr/openmc/core/registry/mobs/listeners/CustomMobDeathListener.java @@ -32,8 +32,8 @@ public void onEntityDeath(EntityDeathEvent event) { customMob.onDeath(customMob, event); - if (customMob.getLoots() == null) return; - for (CustomLoot loot : customMob.getLoots()) { + if (customMob.getLootTable() == null) return; + for (CustomLoot loot : customMob.getLootTable().rollLoots().loots()) { if (Math.random() >= loot.getChance()) continue; if (loot instanceof ItemLoot itemLoot) { event.getDrops().add(itemLoot.getItemLootWithAmount()); diff --git a/src/main/resources/translations/default/events.properties b/src/main/resources/translations/default/events.properties index 43cfce2a7..1e2b1f2a0 100644 --- a/src/main/resources/translations/default/events.properties +++ b/src/main/resources/translations/default/events.properties @@ -30,25 +30,25 @@ feature.events.halloween.menu.deposit.button.lore=Cliquez ici pour dépose
obtenir des récompenses ! feature.events.halloween.menu.deposit.no_pumpkin=Vous n'avez aucune citrouille à déposer ! feature.events.halloween.menu.deposit.success=Vous avez déposé %1$s citrouilles ! -feature.events.halloween.reward.rank1.name=<#ff6b25>La Tarte de la Victoire (2025) +feature.events.halloween.reward.rank1.name=<#ff6b25>La Tarte de la Victoire (2026) feature.events.halloween.reward.rank1.lore=Récompense du joueur ayant récolté le plus de citrouilles\ -
lors de l'événement Halloween 2025.\ +
lors de l'événement Halloween 2026.\
\
Obtenu par %1$s -feature.events.halloween.reward.rank2.name=<#ff6b25>La Tarte de l'Excellence (2025) +feature.events.halloween.reward.rank2.name=<#ff6b25>La Tarte de l'Excellence (2026) feature.events.halloween.reward.rank2.lore=Récompense du joueur ayant récolté la deuxième plus\
grande quantité de citrouilles lors de l'événement\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtenu par %1$s -feature.events.halloween.reward.rank3.name=<#ff6b25>La Tarte du Mérite (2025) +feature.events.halloween.reward.rank3.name=<#ff6b25>La Tarte du Mérite (2026) feature.events.halloween.reward.rank3.lore=Récompense du joueur ayant récolté la troisième plus\
grande quantité de citrouilles lors de l'événement\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtenu par %1$s feature.events.halloween.unknown_player=Inconnu -feature.events.halloween.event.end.broadcast=<#ff6b25>L'événement Halloween 2025 est maintenant terminé !\ +feature.events.halloween.event.end.broadcast=<#ff6b25>L'événement Halloween 2026 est maintenant terminé !\
<#ff6b25>Vous pouvez retrouver vos récompenses dans votre<#ff6b25> boîte aux lettres<#ff6b25>.\
<#ffd580>Merci à tous pour votre participation ! diff --git a/src/main/resources/translations/default/tickets.properties b/src/main/resources/translations/default/tickets.properties index 334f5bda9..aba4df0af 100644 --- a/src/main/resources/translations/default/tickets.properties +++ b/src/main/resources/translations/default/tickets.properties @@ -1,12 +1,12 @@ feature.tickets.machine.title=Machine à boules -feature.tickets.machine.hologram_line1=Machine à boules V1 +feature.tickets.machine.hologram_line1=Machine à boules V2 feature.tickets.machine.hologram_line2=Cliquez pour jouer ! feature.tickets.machine.hologram_line3=Bonne chance ! feature.tickets.menu.get_tickets.title=Récupérer mes tickets feature.tickets.menu.get_tickets.lore1=Récupérer les tickets que feature.tickets.menu.get_tickets.lore2=vous avez récolté grâce à votre -feature.tickets.menu.get_tickets.lore3=temps de jeu sur OpenMC V1. +feature.tickets.menu.get_tickets.lore3=temps de jeu sur OpenMC V2. feature.tickets.menu.no_stats=Vous n'avez pas de statistique pour récupérer des tickets. feature.tickets.menu.already_claimed=Vous avez déjà récupéré vos tickets ! feature.tickets.menu.no_tickets=Vous n'avez pas de tickets à récupérer ! diff --git a/src/main/resources/translations/en_GB/events.properties b/src/main/resources/translations/en_GB/events.properties index 07221df3e..ef66704a6 100644 --- a/src/main/resources/translations/en_GB/events.properties +++ b/src/main/resources/translations/en_GB/events.properties @@ -30,25 +30,25 @@ feature.events.halloween.menu.deposit.button.lore=Click here to drop off y
get rewards! feature.events.halloween.menu.deposit.no_pumpkin=You don't have to drop any pumpkins! feature.events.halloween.menu.deposit.success=You submitted %1$s pumpkins! -feature.events.halloween.reward.rank1.name=<#ff6b25>Victory Pie (2025) +feature.events.halloween.reward.rank1.name=<#ff6b25>Victory Pie (2026) feature.events.halloween.reward.rank1.lore=Reward for the player who collected the most pumpkins\ -
during the Halloween 2025 event.\ +
during the Halloween 2026 event.\
\
Obtained by %1$s -feature.events.halloween.reward.rank2.name=<#ff6b25>The Pie of Excellence (2025) +feature.events.halloween.reward.rank2.name=<#ff6b25>The Pie of Excellence (2026) feature.events.halloween.reward.rank2.lore=Reward for the player who collected the second most\
large quantity of pumpkins during the event\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtained by %1$s -feature.events.halloween.reward.rank3.name=<#ff6b25>The Pie of Merit (2025) +feature.events.halloween.reward.rank3.name=<#ff6b25>The Pie of Merit (2026) feature.events.halloween.reward.rank3.lore=Reward for the player who collected the third most\
large quantity of pumpkins during the event\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtained by %1$s feature.events.halloween.unknown_player=Unknown -feature.events.halloween.event.end.broadcast=<#ff6b25>The Halloween 2025 event is now over!\ +feature.events.halloween.event.end.broadcast=<#ff6b25>The Halloween 2026 event is now over!\
<#ff6b25>You can find your rewards in your<#ff6b25> mailbox<#ff6b25>.\
<#ffd580>Thank you everyone for your participation! diff --git a/src/main/resources/translations/en_GB/milestones.properties b/src/main/resources/translations/en_GB/milestones.properties index 7ceb8269e..9e962adf9 100644 --- a/src/main/resources/translations/en_GB/milestones.properties +++ b/src/main/resources/translations/en_GB/milestones.properties @@ -29,56 +29,56 @@ feature.milestones.tutorial.hologram.links=Useful links: Type /bank or go to the main menu (/menu) to be able to open the menu\
A competitive way to win big rewards! -feature.milestones.tutorial.quest.spare_bank.reward=Well done! You finished thestage %1$s ! THE banks can store an infinite amount of money and protect it if you die! Now let's personalize the gaming experience using settings! +feature.milestones.tutorial.quest.spare_bank.reward=Well done! You finished the stage %1$s ! THE banks can store an infinite amount of money and protect it if you die! Now let's personalize the gaming experience using settings! feature.milestones.tutorial.quest.sell_buy.name=Buy or sell a resource in the adminshop feature.milestones.tutorial.quest.sell_buy.description=Type /adminshop or go to the main menu /menu to be able to sell or buy a resource\
This is the beginning of wealth! -feature.milestones.tutorial.quest.sell_buy.reward=Well done! You finished thestage %1$s ! L'adminshop offers various items so you can build, or make money! However, when you die you lose %2$s% of your money! It is therefore important to pay attention to your skin, or else deposit money in your bank! +feature.milestones.tutorial.quest.sell_buy.reward=Well done! You finished the stage %1$s ! L'adminshop offers various items so you can build, or make money! However, when you die you lose %2$s% of your money! It is therefore important to pay attention to your skin, or else deposit money in your bank! feature.milestones.tutorial.quest.open_settings.name=Open settings menu feature.milestones.tutorial.quest.open_settings.description=Type /settings or go to the main menu (/menu) to be able to open the menu\
This will allow you to configure your gaming experience! -feature.milestones.tutorial.quest.open_settings.reward=Well done! You finished thestage %1$s ! THE settings customize your game, they can be useful in certain cases, such as blocking friend requests, ... On a separate subject, you can switch to competition mode thanks to the contests, a sort of weekly competition! +feature.milestones.tutorial.quest.open_settings.reward=Well done! You finished the stage %1$s ! THE settings customize your game, they can be useful in certain cases, such as blocking friend requests, ... On a separate subject, you can switch to competition mode thanks to the contests, a sort of weekly competition! feature.milestones.tutorial.quest.open_quest.name=Open the quest menu feature.milestones.tutorial.quest.open_quest.description=Type /quests or go to the main menu (/menu) to be able to open the menu and see what quests you can complete\
This will launch you into adventure and give you challenges in order to diversify! -feature.milestones.tutorial.quest.open_quest.reward=Well done! You finished thestage %1$s ! THE quests will help you get money easily for the start of game ! You can attempt to accomplish the stain whatever you want! +feature.milestones.tutorial.quest.open_quest.reward=Well done! You finished the stage %1$s ! THE quests will help you get money easily for the start of game ! You can attempt to accomplish the stain whatever you want! feature.milestones.tutorial.quest.open_contest.name=Open the contests menu feature.milestones.tutorial.quest.open_contest.description=Type /contest or go to the main menu (/menu) to be able to open the menu\
A competitive way to win big rewards! -feature.milestones.tutorial.quest.open_contest.reward=Well done! You finished thestage %1$s ! THE contests pit 2 groups against each other on a theme, the winners win a big reward! And here the tutorial is now finished, go and collect your reward in the mailbox, a letter system for receiving or sending letters! +feature.milestones.tutorial.quest.open_contest.reward=Well done! You finished the stage %1$s ! THE contests pit 2 groups against each other on a theme, the winners win a big reward! And here the tutorial is now finished, go and collect your reward in the mailbox, a letter system for receiving or sending letters! feature.milestones.tutorial.quest.open_adminshop.name=Open the adminshop menu feature.milestones.tutorial.quest.open_adminshop.description=Type /adminshop or go to the main menu (/menu) to be able to open the menu\
The market which varies according to supply and demand! -feature.milestones.tutorial.quest.open_adminshop.reward=Well done! You finished thestage %1$s ! L'adminshop will help you get money and blocks! You can now sell or buy a resource in the adminshop! +feature.milestones.tutorial.quest.open_adminshop.reward=Well done! You finished the stage %1$s ! L'adminshop will help you get money and blocks! You can now sell or buy a resource in the adminshop! feature.milestones.tutorial.quest.home_upgrade.name=Improve your house limit feature.milestones.tutorial.quest.home_upgrade.description=Type /upgradehome or go to the menu of the homes (/homes)\
to be able to improve your house limit\
This will allow you to have more homes! -feature.milestones.tutorial.quest.home_upgrade.reward=Well done! You finished thestage %1$s ! THE homes will be very useful for moving quickly between your bases! Now I think you need challenges! Open the menu of quests. +feature.milestones.tutorial.quest.home_upgrade.reward=Well done! You finished the stage %1$s ! THE homes will be very useful for moving quickly between your bases! Now I think you need challenges! Open the menu of quests. feature.milestones.tutorial.quest.home_create.name=Place a home feature.milestones.tutorial.quest.home_create.description=Type /sethome by being where you want to put your home\
It's very useful to make one to teleport to your base! -feature.milestones.tutorial.quest.home_create.reward=Well done! You finished thestage %1$s ! Homes are often used to avoid losing your base! You are limited to only having 1 home at the start. We will have to think about improving them... +feature.milestones.tutorial.quest.home_create.reward=Well done! You finished the stage %1$s ! Homes are often used to avoid losing your base! You are limited to only having 1 home at the start. We will have to think about improving them... feature.milestones.tutorial.quest.finish_quest.name=Complete a quest feature.milestones.tutorial.quest.finish_quest.description=Complete a quest of your choice\
This will be able to give you money or certain resources! -feature.milestones.tutorial.quest.finish_quest.reward=Well done! You finished thestage %1$s ! And here is a reward ! Practical, right? Let's discover another method of producing money and consuming it! Go into theadminshop, a place where several items can be purchased at varying prices depending on thesupply and demand ! +feature.milestones.tutorial.quest.finish_quest.reward=Well done! You finished the stage %1$s ! And here is a reward ! Practical, right? Let's discover another method of producing money and consuming it! Go into the adminshop, a place where several items can be purchased at varying prices depending on the supply and demand ! feature.milestones.tutorial.quest.claim_letter.name=Open the rewards letter feature.milestones.tutorial.quest.claim_letter.description=Type /mailbox or go to the main menu (/menu) to be able to open the mailbox menu\
An efficient way to send items to other players! -feature.milestones.tutorial.quest.claim_letter.reward=Well done! You finished thestage %1$s ! You have discovered the basics of OpenMC. And now, you're free to discover the features for yourself! With that, we wish you the best in your adventure on OpenMC ! +feature.milestones.tutorial.quest.claim_letter.reward=Well done! You finished the stage %1$s ! You have discovered the basics of OpenMC. And now, you're free to discover the features for yourself! With that, we wish you the best in your adventure on OpenMC ! feature.milestones.tutorial.quest.city_create.name=Create/Join a city feature.milestones.tutorial.quest.city_create.description=Do /city to start creating your city\
or join a city using an invitation! -feature.milestones.tutorial.quest.city_create.reward=Well done! You finished thestage %1$s ! This version of OpenMC is centered around cities. There you will find a special milestone for cities (/city milestone) who will guide you in this unique adventure! And if you passed your city to level 2 ? +feature.milestones.tutorial.quest.city_create.reward=Well done! You finished the stage %1$s ! This version of OpenMC is centered around cities. There you will find a special milestone for cities (/city milestone) who will guide you in this unique adventure! And if you passed your city to level 2 ? feature.milestones.tutorial.quest.city_level_two.name=Have a level 2 city feature.milestones.tutorial.quest.city_level_two.description=Do /city milestone to find out more how\
improve your city! -feature.milestones.tutorial.quest.city_level_two.reward=Well done! You finished thestage %1$s ! You're well on your way to discovering all the features hidden in cities! But before that, I would like you to ask a home. +feature.milestones.tutorial.quest.city_level_two.reward=Well done! You finished the stage %1$s ! You're well on your way to discovering all the features hidden in cities! But before that, I would like you to ask a home. feature.milestones.tutorial.quest.break_aywenite.name=Break 30 Aywenites feature.milestones.tutorial.quest.break_aywenite.description=The new ore %1$s of V2, found in caves (%2$s, %3$s)\
It will be to you useful in many features -feature.milestones.tutorial.quest.break_aywenite.reward=Well done! You finished thestage %1$s ! As said previously theAywenite %2$s is an ore, valuable for features. Besides, you can use it to make your city! +feature.milestones.tutorial.quest.break_aywenite.reward=Well done! You finished the stage %1$s ! As said previously the Aywenite %2$s is an ore, valuable for features. Besides, you can use it to make your city! feature.milestones.tutorial.quest.connect_discord.name=Connect to Discord feature.milestones.tutorial.quest.connect_discord.description=Connect your Discord account to your Minecraft account!\ @@ -90,6 +90,6 @@ feature.milestones.tutorial.quest.connect_discord.reward=Well done! You f feature.milestones.tutorial.quest.place_shop.name=Place a shop feature.milestones.tutorial.quest.place_shop.description=Place a shop and start selling your items!\
if possible, as close to spawn as you can for more sales! -feature.milestones.tutorial.quest.place_shop.reward=Well done! You finishedstage %1$s! You now have a shop in your city. Congratulations! Discover all the mechanics linked \ +feature.milestones.tutorial.quest.place_shop.reward=Well done! You finished stage %1$s! You now have a shop in your city. Congratulations! Discover all the mechanics linked \
to shops; all management is done in a single menu! \
Now let's customize the game experience with settings! diff --git a/src/main/resources/translations/en_GB/tickets.properties b/src/main/resources/translations/en_GB/tickets.properties index 36c32ea7f..89456427f 100644 --- a/src/main/resources/translations/en_GB/tickets.properties +++ b/src/main/resources/translations/en_GB/tickets.properties @@ -1,12 +1,12 @@ feature.tickets.machine.title=Ball machine -feature.tickets.machine.hologram_line1=Ball machine V1 +feature.tickets.machine.hologram_line1=Ball machine V2 feature.tickets.machine.hologram_line2=Click to play! feature.tickets.machine.hologram_line3=Good luck ! feature.tickets.menu.get_tickets.title=Collect my tickets feature.tickets.menu.get_tickets.lore1=Collect the tickets that feature.tickets.menu.get_tickets.lore2=you have collected thanks to your -feature.tickets.menu.get_tickets.lore3=playing time on OpenMC V1. +feature.tickets.menu.get_tickets.lore3=playing time on OpenMC V2. feature.tickets.menu.no_stats=You do not have statistics to recover tickets. feature.tickets.menu.already_claimed=You have already collected your tickets! feature.tickets.menu.no_tickets=You don't have any tickets to collect! diff --git a/src/main/resources/translations/en_US/events.properties b/src/main/resources/translations/en_US/events.properties index 07221df3e..ef66704a6 100644 --- a/src/main/resources/translations/en_US/events.properties +++ b/src/main/resources/translations/en_US/events.properties @@ -30,25 +30,25 @@ feature.events.halloween.menu.deposit.button.lore=Click here to drop off y
get rewards! feature.events.halloween.menu.deposit.no_pumpkin=You don't have to drop any pumpkins! feature.events.halloween.menu.deposit.success=You submitted %1$s pumpkins! -feature.events.halloween.reward.rank1.name=<#ff6b25>Victory Pie (2025) +feature.events.halloween.reward.rank1.name=<#ff6b25>Victory Pie (2026) feature.events.halloween.reward.rank1.lore=Reward for the player who collected the most pumpkins\ -
during the Halloween 2025 event.\ +
during the Halloween 2026 event.\
\
Obtained by %1$s -feature.events.halloween.reward.rank2.name=<#ff6b25>The Pie of Excellence (2025) +feature.events.halloween.reward.rank2.name=<#ff6b25>The Pie of Excellence (2026) feature.events.halloween.reward.rank2.lore=Reward for the player who collected the second most\
large quantity of pumpkins during the event\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtained by %1$s -feature.events.halloween.reward.rank3.name=<#ff6b25>The Pie of Merit (2025) +feature.events.halloween.reward.rank3.name=<#ff6b25>The Pie of Merit (2026) feature.events.halloween.reward.rank3.lore=Reward for the player who collected the third most\
large quantity of pumpkins during the event\ -
Halloween 2025.\ +
Halloween 2026.\
\
Obtained by %1$s feature.events.halloween.unknown_player=Unknown -feature.events.halloween.event.end.broadcast=<#ff6b25>The Halloween 2025 event is now over!\ +feature.events.halloween.event.end.broadcast=<#ff6b25>The Halloween 2026 event is now over!\
<#ff6b25>You can find your rewards in your<#ff6b25> mailbox<#ff6b25>.\
<#ffd580>Thank you everyone for your participation! diff --git a/src/main/resources/translations/en_US/milestones.properties b/src/main/resources/translations/en_US/milestones.properties index c16f13c2c..9e962adf9 100644 --- a/src/main/resources/translations/en_US/milestones.properties +++ b/src/main/resources/translations/en_US/milestones.properties @@ -29,56 +29,56 @@ feature.milestones.tutorial.hologram.links=Useful links: Type
/bank or go to the main menu (/menu) to be able to open the menu\
A competitive way to win big rewards! -feature.milestones.tutorial.quest.spare_bank.reward=Well done! You finished thestage %1$s ! THE banks can store an infinite amount of money and protect it if you die! Now let's personalize the gaming experience using settings! +feature.milestones.tutorial.quest.spare_bank.reward=Well done! You finished the stage %1$s ! THE banks can store an infinite amount of money and protect it if you die! Now let's personalize the gaming experience using settings! feature.milestones.tutorial.quest.sell_buy.name=Buy or sell a resource in the adminshop feature.milestones.tutorial.quest.sell_buy.description=Type /adminshop or go to the main menu /menu to be able to sell or buy a resource\
This is the beginning of wealth! -feature.milestones.tutorial.quest.sell_buy.reward=Well done! You finished thestage %1$s ! L'adminshop offers various items so you can build, or make money! However, when you die you lose %2$s% of your money! It is therefore important to pay attention to your skin, or else deposit money in your bank! +feature.milestones.tutorial.quest.sell_buy.reward=Well done! You finished the stage %1$s ! L'adminshop offers various items so you can build, or make money! However, when you die you lose %2$s% of your money! It is therefore important to pay attention to your skin, or else deposit money in your bank! feature.milestones.tutorial.quest.open_settings.name=Open settings menu feature.milestones.tutorial.quest.open_settings.description=Type /settings or go to the main menu (/menu) to be able to open the menu\
This will allow you to configure your gaming experience! -feature.milestones.tutorial.quest.open_settings.reward=Well done! You finished thestage %1$s ! THE settings customize your game, they can be useful in certain cases, such as blocking friend requests, ... On a separate subject, you can switch to competition mode thanks to the contests, a sort of weekly competition! +feature.milestones.tutorial.quest.open_settings.reward=Well done! You finished the stage %1$s ! THE settings customize your game, they can be useful in certain cases, such as blocking friend requests, ... On a separate subject, you can switch to competition mode thanks to the contests, a sort of weekly competition! feature.milestones.tutorial.quest.open_quest.name=Open the quest menu feature.milestones.tutorial.quest.open_quest.description=Type /quests or go to the main menu (/menu) to be able to open the menu and see what quests you can complete\
This will launch you into adventure and give you challenges in order to diversify! -feature.milestones.tutorial.quest.open_quest.reward=Well done! You finished thestage %1$s ! THE quests will help you get money easily for the start of game ! You can attempt to accomplish the stain whatever you want! +feature.milestones.tutorial.quest.open_quest.reward=Well done! You finished the stage %1$s ! THE quests will help you get money easily for the start of game ! You can attempt to accomplish the stain whatever you want! feature.milestones.tutorial.quest.open_contest.name=Open the contests menu feature.milestones.tutorial.quest.open_contest.description=Type /contest or go to the main menu (/menu) to be able to open the menu\
A competitive way to win big rewards! -feature.milestones.tutorial.quest.open_contest.reward=Well done! You finished thestage %1$s ! THE contests pit 2 groups against each other on a theme, the winners win a big reward! And here the tutorial is now finished, go and collect your reward in the mailbox, a letter system for receiving or sending letters! +feature.milestones.tutorial.quest.open_contest.reward=Well done! You finished the stage %1$s ! THE contests pit 2 groups against each other on a theme, the winners win a big reward! And here the tutorial is now finished, go and collect your reward in the mailbox, a letter system for receiving or sending letters! feature.milestones.tutorial.quest.open_adminshop.name=Open the adminshop menu feature.milestones.tutorial.quest.open_adminshop.description=Type /adminshop or go to the main menu (/menu) to be able to open the menu\
The market which varies according to supply and demand! -feature.milestones.tutorial.quest.open_adminshop.reward=Well done! You finished thestage %1$s ! L'adminshop will help you get money and blocks! You can now sell or buy a resource in the adminshop! +feature.milestones.tutorial.quest.open_adminshop.reward=Well done! You finished the stage %1$s ! L'adminshop will help you get money and blocks! You can now sell or buy a resource in the adminshop! feature.milestones.tutorial.quest.home_upgrade.name=Improve your house limit feature.milestones.tutorial.quest.home_upgrade.description=Type /upgradehome or go to the menu of the homes (/homes)\
to be able to improve your house limit\
This will allow you to have more homes! -feature.milestones.tutorial.quest.home_upgrade.reward=Well done! You finished thestage %1$s ! THE homes will be very useful for moving quickly between your bases! Now I think you need challenges! Open the menu of quests. +feature.milestones.tutorial.quest.home_upgrade.reward=Well done! You finished the stage %1$s ! THE homes will be very useful for moving quickly between your bases! Now I think you need challenges! Open the menu of quests. feature.milestones.tutorial.quest.home_create.name=Place a home feature.milestones.tutorial.quest.home_create.description=Type /sethome by being where you want to put your home\
It's very useful to make one to teleport to your base! -feature.milestones.tutorial.quest.home_create.reward=Well done! You finished thestage %1$s ! Homes are often used to avoid losing your base! You are limited to only having 1 home at the start. We will have to think about improving them... +feature.milestones.tutorial.quest.home_create.reward=Well done! You finished the stage %1$s ! Homes are often used to avoid losing your base! You are limited to only having 1 home at the start. We will have to think about improving them... feature.milestones.tutorial.quest.finish_quest.name=Complete a quest feature.milestones.tutorial.quest.finish_quest.description=Complete a quest of your choice\
This will be able to give you money or certain resources! -feature.milestones.tutorial.quest.finish_quest.reward=Well done! You finished thestage %1$s ! And here is a reward ! Practical, right? Let's discover another method of producing money and consuming it! Go into theadminshop, a place where several items can be purchased at varying prices depending on thesupply and demand ! +feature.milestones.tutorial.quest.finish_quest.reward=Well done! You finished the stage %1$s ! And here is a reward ! Practical, right? Let's discover another method of producing money and consuming it! Go into the adminshop, a place where several items can be purchased at varying prices depending on the supply and demand ! feature.milestones.tutorial.quest.claim_letter.name=Open the rewards letter feature.milestones.tutorial.quest.claim_letter.description=Type /mailbox or go to the main menu (/menu) to be able to open the mailbox menu\
An efficient way to send items to other players! -feature.milestones.tutorial.quest.claim_letter.reward=Well done! You finished thestage %1$s ! You have discovered the basics of OpenMC. And now, you're free to discover the features for yourself! With that, we wish you the best in your adventure on OpenMC ! +feature.milestones.tutorial.quest.claim_letter.reward=Well done! You finished the stage %1$s ! You have discovered the basics of OpenMC. And now, you're free to discover the features for yourself! With that, we wish you the best in your adventure on OpenMC ! feature.milestones.tutorial.quest.city_create.name=Create/Join a city feature.milestones.tutorial.quest.city_create.description=Do /city to start creating your city\
or join a city using an invitation! -feature.milestones.tutorial.quest.city_create.reward=Well done! You finished thestage %1$s ! This version of OpenMC is centered around cities. There you will find a special milestone for cities (/city milestone) who will guide you in this unique adventure! And if you passed your city to level 2 ? +feature.milestones.tutorial.quest.city_create.reward=Well done! You finished the stage %1$s ! This version of OpenMC is centered around cities. There you will find a special milestone for cities (/city milestone) who will guide you in this unique adventure! And if you passed your city to level 2 ? feature.milestones.tutorial.quest.city_level_two.name=Have a level 2 city feature.milestones.tutorial.quest.city_level_two.description=Do /city milestone to find out more how\
improve your city! -feature.milestones.tutorial.quest.city_level_two.reward=Well done! You finished thestage %1$s ! You're well on your way to discovering all the features hidden in cities! But before that, I would like you to ask a home. +feature.milestones.tutorial.quest.city_level_two.reward=Well done! You finished the stage %1$s ! You're well on your way to discovering all the features hidden in cities! But before that, I would like you to ask a home. feature.milestones.tutorial.quest.break_aywenite.name=Break 30 Aywenites -feature.milestones.tutorial.quest.break_aywenite.description=The new ore %1$s of V2, found in caves (%2$s, %3$s) \ +feature.milestones.tutorial.quest.break_aywenite.description=The new ore %1$s of V2, found in caves (%2$s, %3$s)\
It will be to you useful in many features -feature.milestones.tutorial.quest.break_aywenite.reward=Well done! You finished thestage %1$s ! As said previously theAywenite %2$s is an ore, valuable for features. Besides, you can use it to make your city! +feature.milestones.tutorial.quest.break_aywenite.reward=Well done! You finished the stage %1$s ! As said previously the Aywenite %2$s is an ore, valuable for features. Besides, you can use it to make your city! feature.milestones.tutorial.quest.connect_discord.name=Connect to Discord feature.milestones.tutorial.quest.connect_discord.description=Connect your Discord account to your Minecraft account!\ @@ -90,6 +90,6 @@ feature.milestones.tutorial.quest.connect_discord.reward=Well done! You f feature.milestones.tutorial.quest.place_shop.name=Place a shop feature.milestones.tutorial.quest.place_shop.description=Place a shop and start selling your items!\
if possible, as close to spawn as you can for more sales! -feature.milestones.tutorial.quest.place_shop.reward=Well done! You finishedstage %1$s! You now have a shop in your city. Congratulations! Discover all the mechanics linked \ +feature.milestones.tutorial.quest.place_shop.reward=Well done! You finished stage %1$s! You now have a shop in your city. Congratulations! Discover all the mechanics linked \
to shops; all management is done in a single menu! \
Now let's customize the game experience with settings! diff --git a/src/main/resources/translations/en_US/tickets.properties b/src/main/resources/translations/en_US/tickets.properties index 36c32ea7f..89456427f 100644 --- a/src/main/resources/translations/en_US/tickets.properties +++ b/src/main/resources/translations/en_US/tickets.properties @@ -1,12 +1,12 @@ feature.tickets.machine.title=Ball machine -feature.tickets.machine.hologram_line1=Ball machine V1 +feature.tickets.machine.hologram_line1=Ball machine V2 feature.tickets.machine.hologram_line2=Click to play! feature.tickets.machine.hologram_line3=Good luck ! feature.tickets.menu.get_tickets.title=Collect my tickets feature.tickets.menu.get_tickets.lore1=Collect the tickets that feature.tickets.menu.get_tickets.lore2=you have collected thanks to your -feature.tickets.menu.get_tickets.lore3=playing time on OpenMC V1. +feature.tickets.menu.get_tickets.lore3=playing time on OpenMC V2. feature.tickets.menu.no_stats=You do not have statistics to recover tickets. feature.tickets.menu.already_claimed=You have already collected your tickets! feature.tickets.menu.no_tickets=You don't have any tickets to collect!