Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
84860ba
feat: reactived experimental features
iambibi Aug 30, 2026
2e92b9f
fix: rank show but null
iambibi Aug 31, 2026
564fab2
fix: to small
iambibi Sep 4, 2026
01c6db9
Merge remote-tracking branch 'origin/master' into feat/bedrock
iambibi Sep 4, 2026
98d704f
fix: invalid caracter on bedrock with currency bidule la
iambibi Sep 12, 2026
30ecaee
fix: update change every time (hyper casse couille)
iambibi Sep 12, 2026
6777a22
Merge remote-tracking branch 'origin/master' into feat/bedrock
iambibi Sep 20, 2026
681f39d
build: fix + enchanced build.gradle
iambibi Sep 20, 2026
738e919
fix: item
iambibi Sep 20, 2026
f1c5101
Merge branch 'master' into feat/bedrock
iambibi Oct 15, 2026
7f08172
Merge branch 'master' into feat/bedrock
iambibi Oct 15, 2026
299894e
build: fix
iambibi Oct 15, 2026
b209aa9
bump lamp
iambibi Oct 15, 2026
0246107
update api Item Scan for multiple textures
iambibi Oct 15, 2026
dcc598f
feat: scan block behaviour
iambibi Oct 16, 2026
a27ac64
fix little bug
iambibi Oct 16, 2026
102069a
feat: blocks states scanner
iambibi Oct 16, 2026
9ffd7f1
feat: blockstate acces in BlocksBehaviour
iambibi Oct 16, 2026
62cb869
fix: error
iambibi Oct 16, 2026
48fdbe4
fix: conception
iambibi Oct 16, 2026
943074d
fix: adjust code for blocks definition
iambibi Oct 19, 2026
064f3d7
feat: pdate
iambibi Oct 19, 2026
8e9986a
feat: scan tooltip_style
iambibi Oct 20, 2026
2b309d1
feat: tooltip (utils)
iambibi Oct 20, 2026
41dc462
feat: sounds
iambibi Oct 20, 2026
f914e08
feat: WIP menu gui
iambibi Oct 21, 2026
94a2c09
feat: ArmorsBehaviour
iambibi Oct 21, 2026
b34229f
feat: custom armor
iambibi Oct 22, 2026
ef174cb
fix: cold boots
iambibi Oct 22, 2026
158a86f
feat: start of items 3d
iambibi Oct 22, 2026
d673cfe
fix: multiple textures
iambibi Oct 22, 2026
b1499bf
change: branch
iambibi Oct 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,34 @@ group = 'fr.openmc'

repositories {
mavenCentral()
// * PlaceholderAPI
maven {
url "https://repo.extendedclip.com/content/repositories/placeholderapi/"
}
// * WorldGuard & WorldEdit
maven {
url "https://maven.enginehub.org/repo/"
}
// * FancyNpc
maven {
url "https://repo.fancyinnovations.com/releases"
}
// * PaperMC
maven {
url = "https://repo.papermc.io/repository/maven-public/"
}
// * GeyserMC
maven {
url "https://repo.opencollab.dev/main/"
}
// * ItemsAdder
maven {
url "https://maven.devs.beer/"
}
// * ProtocolLib
maven {
url "https://repo.dmulloy2.net/repository/public/"
}
// * GeyserMC
//maven {url "https://repo.opencollab.dev/main/"}
maven {
url "https://jitpack.io" // Toujours à la fin
}
Expand All @@ -71,9 +79,9 @@ dependencies {
compileOnly "net.dmulloy2:ProtocolLib:${protocolLibVersion}"

// Bedrock Dependencies
//compileOnly files("libs/RiftEngine-${riftEngineVersion}.jar")
//compileOnly "org.geysermc.geyser:api:${geyserApiVersion}"
//compileOnly "org.geysermc.floodgate:api:${floodgateApiVersion}"
compileOnly files("libs/RiftEngine-${riftEngineVersion}.jar")
compileOnly "org.geysermc.geyser:api:${geyserApiVersion}"
compileOnly "org.geysermc.floodgate:api:${floodgateApiVersion}"

implementation "org.jetbrains:annotations:${jetbrainsAnnotationsVersion}"
implementation "io.github.revxrsal:lamp.common:${revxrsalLampVersion}"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protocolLibVersion = 5.4.0

# Dependencies
jetbrainsAnnotationsVersion = 26.1.0
revxrsalLampVersion = 4.0.0-rc.18
revxrsalLampVersion = 4.0.0-rc.19
ormVersion = 6.1
lombokVersion = 1.18.48

Expand Down
2 changes: 1 addition & 1 deletion local.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
minecraftServerDir=/home/iambibi_/Documents/ServeurMinecraftLocal/26.3-OMC
minecraftServerDir=/home/iambibi_/Documents/ServeurMinecraftLocal/26.3-OMC-Rift
10 changes: 5 additions & 5 deletions src/main/java/fr/openmc/core/OMCPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ public void loadAfterItemsAdder() {
ItemsAddersListener.setLoaded(true);

// todo: a rewrite lors registre hook et features
// try {
// new BedrockHook().startInit();
// } catch (NoClassDefFoundError e) {
// OMCLogger.error("Hook BedrockHook désactivé (package non trouvé) " + e.getMessage());
// }
try {
new BedrockHook().startInit();
} catch (NoClassDefFoundError e) {
OMCLogger.error("Hook BedrockHook désactivé (package non trouvé) " + e.getMessage());
}

/* LOAD ITEMS ADDER CONTENTS */
ItemsAdderHook.loadContents();
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/fr/openmc/core/OMCRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import fr.openmc.core.registry.loottable.CustomLootTableRegistry;
import fr.openmc.core.registry.mobs.CustomMobRegistry;
import fr.openmc.core.registry.regions.CustomRegionRegistry;
import fr.openmc.riftengine.api.registry.scanner.ScannerRegistry;
import fr.openmc.core.registry.worldtemplates.WorldTemplateRegistry;
import fr.openmc.riftengine.api.registry.scanner.ScannerRegistry;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;

import java.io.IOException;
Expand Down Expand Up @@ -87,7 +87,7 @@ public static void bootstrapAll(BootstrapContext context) {
r.bootstrap(context);
} catch (IOException e) {
OMCLogger.errorFormatted("Erreur lors du chargement du registre lors du bootstrap");
OMCLogger.error(e.getMessage());
OMCLogger.error(e.getMessage(), e);
}
OMCLogger.successFormatted("Registre {} chargé pendant le bootstrap", r.getClass().getSimpleName());
}
Expand All @@ -108,7 +108,7 @@ public static void initAll() {
r.init();
} catch (Exception e) {
OMCLogger.errorFormatted("Erreur lors du chargement du registre lors du runtime");
OMCLogger.error(e.getMessage());
OMCLogger.error(e.getMessage(), e);
}
OMCLogger.successFormatted("Registre {} chargé pendant le runtime", r.getClass().getSimpleName());
}
Expand All @@ -130,7 +130,7 @@ public static void postInitAll() {
r.postInit();
} catch (Exception e) {
OMCLogger.errorFormatted("Erreur lors du chargement du registre apres ItemsAdder");
OMCLogger.error(e.getMessage());
OMCLogger.error(e.getMessage(), e);
}

OMCLogger.successFormatted("Registre {} chargé après ItemsAdder", r.getClass().getSimpleName());
Expand Down
11 changes: 2 additions & 9 deletions src/main/java/fr/openmc/core/features/bits/BitsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@
import fr.openmc.core.features.bits.commands.BitsCommands;
import fr.openmc.core.features.bits.models.BitsPlayer;
import fr.openmc.core.features.city.sub.bank.CityBankManager;
import fr.openmc.core.features.economy.EconomyManager;
import fr.openmc.core.hooks.github.GitHubHook;
import fr.openmc.core.hooks.github.models.ContributorStats;
import fr.openmc.core.hooks.itemsadder.ItemsAdderHook;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitTask;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.NumberFormat;
import java.util.*;

@Credit(developers = {"iambibi_"})
Expand Down Expand Up @@ -117,13 +116,7 @@ public static BitsPlayer getBitsPlayer(UUID playerUUID) {
}

public static String getFormattedBits(UUID playerUUID) {
String balance = String.valueOf(getBits(playerUUID));
Currency currency = Currency.getInstance(Locale.FRANCE);
NumberFormat format = NumberFormat.getCurrencyInstance(Locale.FRANCE);
format.setCurrency(currency);
BigDecimal bd = new BigDecimal(balance);
return format.format(bd).replace(NumberFormat.getCurrencyInstance(Locale.FRANCE).getCurrency().getSymbol(),
getBitsIcon());
return EconomyManager.getFormattedNumber(getBits(playerUUID));
}

public static String getBitsIcon() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public List<ItemStack> getItems() {
Component membersCurrent = Component.text(city.getMembers().size()).color(NamedTextColor.GREEN);
Component membersLimit = Component.text(MemberLimitRewards.getMemberLimit(city.getLevel())).color(NamedTextColor.GREEN);
Component areaComponent = Component.text(city.getChunks().size()).color(NamedTextColor.GOLD);
Component wealthComponent = Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance())).color(NamedTextColor.GOLD);
Component wealthComponent = Component.text(EconomyManager.getFormattedNumber(city.getBalance())).color(NamedTextColor.GOLD);
Component wealthIcon = Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.GOLD);
Component powerComponent = Component.text(city.getPowerPoints()).color(NamedTextColor.RED);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void onInventoryClick(InventoryClickEvent inventoryClickEvent) {
map.put(22, new ItemMenuBuilder(this, new ItemStack(Material.DIAMOND),
itemMeta -> itemMeta.displayName(TranslationManager.translation(
"feature.city.menus.list.details.wealth",
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance())).color(NamedTextColor.GOLD),
Component.text(EconomyManager.getFormattedNumber(city.getBalance())).color(NamedTextColor.GOLD),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.GOLD)
))));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public List<ItemStack> getItems() {
Component membersLimit = Component.text(MemberLimitRewards.getMemberLimit(city.getLevel())).color(NamedTextColor.GREEN);
Component membersSuffix = Component.text(city.getMembers().size() > 1 ? "s" : "");
Component typeComponent = city.getType().getDisplayName();
Component wealthComponent = Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance())).color(NamedTextColor.GOLD);
Component wealthComponent = Component.text(EconomyManager.getFormattedNumber(city.getBalance())).color(NamedTextColor.GOLD);
Component wealthIcon = Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.GOLD);
if (MayorManager.phaseMayor == 2 && FeaturesRewards.hasUnlockFeature(city, FeaturesRewards.Feature.MAYOR)) {
Component mayorCity = city.getMayor() == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static List<Component> getDynamicLore(City city, CityNotation notation)
"feature.city.menus.main.notation.lore",
Component.text(Math.floor(notation.getTotalNote())).color(NamedTextColor.BLUE),
Component.text(NotationNote.getMaxTotalNote()).color(NamedTextColor.BLUE),
Component.text(EconomyManager.getFormattedSimplifiedNumber(notation.getMoney())).color(NamedTextColor.GOLD),
Component.text(EconomyManager.getFormattedNumber(notation.getMoney())).color(NamedTextColor.GOLD),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.GOLD)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static void withdrawCityBank(City city, Player player, String input) {
MessagesManager.sendMessage(player,
TranslationManager.translation(
"feature.city.bank.withdraw.success",
Component.text(EconomyManager.getFormattedSimplifiedNumber(amount)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(amount)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE)
),
Prefix.CITY, MessageType.SUCCESS, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onInventoryClick(InventoryClickEvent click) {
if (hasPermissionMoneyGive) {
loreBankDepositAll = TranslationManager.translationLore(
"feature.city.bank.menu.deposit.all.lore",
Component.text(EconomyManager.getFormattedSimplifiedNumber(moneyPlayer)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(moneyPlayer)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE)
);
} else {
Expand All @@ -90,7 +90,7 @@ public void onInventoryClick(InventoryClickEvent click) {
if (hasPermissionMoneyGive) {
loreBankDepositHalf = TranslationManager.translationLore(
"feature.city.bank.menu.deposit.half.lore",
Component.text(EconomyManager.getFormattedSimplifiedNumber(halfMoneyPlayer)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(halfMoneyPlayer)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void onInventoryClick(InventoryClickEvent click) {
itemMeta.itemName(TranslationManager.translation("feature.city.bank.menu.balance.title"));
itemMeta.lore(TranslationManager.translationLore(
"feature.city.bank.menu.balance.lore",
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance())).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(city.getBalance())).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE),
Component.text(city.calculateCityInterest() * 100 + "%").color(NamedTextColor.AQUA),
Component.text(DateUtils.convertSecondToTime(BankManager.getSecondsUntilInterest())).color(NamedTextColor.AQUA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onInventoryClick(InventoryClickEvent click) {
if (hasPermissionMoneyTake) {
loreBankWithdrawAll = TranslationManager.translationLore(
"feature.city.bank.menu.withdraw.all.lore",
Component.text(EconomyManager.getFormattedSimplifiedNumber(moneyBankCity)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(moneyBankCity)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE)
);
} else {
Expand All @@ -89,7 +89,7 @@ public void onInventoryClick(InventoryClickEvent click) {
if (hasPermissionMoneyTake) {
loreBankWithdrawHalf = TranslationManager.translationLore(
"feature.city.bank.menu.withdraw.half.lore",
Component.text(EconomyManager.getFormattedSimplifiedNumber(halfMoneyBankCity)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getFormattedNumber(halfMoneyBankCity)).color(NamedTextColor.LIGHT_PURPLE),
Component.text(EconomyManager.getEconomyIcon()).color(NamedTextColor.LIGHT_PURPLE)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("5k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -214,7 +214,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("15k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -294,7 +294,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("20k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -364,7 +364,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("30k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -455,7 +455,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("40k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -528,7 +528,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("60k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -620,7 +620,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("80k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down Expand Up @@ -700,7 +700,7 @@ public enum CityLevels {
return TranslationManager.translation(
"feature.city.levels.requirements.bank.progress",
Component.text("200k"),
Component.text(EconomyManager.getFormattedSimplifiedNumber(city.getBalance()))
Component.text(EconomyManager.getFormattedNumber(city.getBalance()))
);
}
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,14 @@ public static void broadcastWarResult(War war, City winner, City loser, WinReaso
Component rewardMoney = bonusMoney > 0
? TranslationManager.translation(
"feature.city.war.result.reward.money_bonus",
Component.text(EconomyManager.getFormattedSimplifiedNumber(amountStolen) + EconomyManager.getEconomyIcon())
Component.text(EconomyManager.getFormattedNumber(amountStolen) + EconomyManager.getEconomyIcon())
.color(NamedTextColor.GOLD),
Component.text(EconomyManager.getFormattedSimplifiedNumber(bonusMoney) + EconomyManager.getEconomyIcon())
Component.text(EconomyManager.getFormattedNumber(bonusMoney) + EconomyManager.getEconomyIcon())
.color(NamedTextColor.GOLD)
)
: TranslationManager.translation(
"feature.city.war.result.reward.money",
Component.text(EconomyManager.getFormattedSimplifiedNumber(amountStolen) + EconomyManager.getEconomyIcon())
Component.text(EconomyManager.getFormattedNumber(amountStolen) + EconomyManager.getEconomyIcon())
.color(NamedTextColor.GOLD)
);
Component rewardClaims = TranslationManager.translation(
Expand Down Expand Up @@ -378,7 +378,7 @@ public static void broadcastWarResult(War war, City winner, City loser, WinReaso
);
Component lossMoney = TranslationManager.translation(
"feature.city.war.result.loss.money",
Component.text(EconomyManager.getFormattedSimplifiedNumber(amountStolen) + EconomyManager.getEconomyIcon())
Component.text(EconomyManager.getFormattedNumber(amountStolen) + EconomyManager.getEconomyIcon())
.color(NamedTextColor.RED)
);
Component lossClaims = TranslationManager.translation(
Expand Down
Loading
Loading