Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7b89ed9
Séparation des shops et entreprises
gab4000 Aug 29, 2025
301eafa
Merge branch 'refs/heads/master' into shops
gab4000 Aug 29, 2025
c9b05ec
Merge branch 'ServerOpenMC:master' into shops
gab4000 Aug 30, 2025
4a47d29
refactor: rename ShopBlocksManager to ShopManager and update related …
gab4000 Aug 30, 2025
74c4411
Merge branch 'refs/heads/master' into shops
gab4000 Sep 21, 2025
3fc3cc6
Merge branch 'ServerOpenMC:master' into shops
gab4000 Sep 21, 2025
e334f04
Merge branch 'refs/heads/master' into shops
gab4000 Oct 18, 2025
0ceba86
Merge branch 'master' into shops
gab4000 Oct 21, 2025
5c55339
Merge branch 'master' into shops
gab4000 Oct 24, 2025
fbaf5d1
Merge branch 'ServerOpenMC:master' into shops
gab4000 Oct 26, 2025
51998d2
resolve build error
gab4000 Oct 26, 2025
605e36e
Merge branch 'ServerOpenMC:master' into shops
gab4000 Oct 26, 2025
df40265
Merge branch 'ServerOpenMC:master' into shops
gab4000 Oct 26, 2025
5793aae
Merge branch 'master' into shops
gab4000 Oct 29, 2025
e005826
Merge branch 'master' into shops
gab4000 Nov 1, 2025
0b18023
refactor: improve shop creation logic and validation messages
gab4000 Nov 1, 2025
87dbd3a
Merge branch 'ServerOpenMC:master' into shops
gab4000 Nov 8, 2025
e2c96af
Merge branch 'ServerOpenMC:master' into shops
gab4000 Nov 11, 2025
3806734
finalize creation logic
gab4000 Nov 11, 2025
c759c00
refactor: streamline item interaction checks and improve shop creatio…
gab4000 Nov 12, 2025
7e5ec0a
refactor: DB management at creating/removing shops
gab4000 Nov 12, 2025
a72f92c
Merge branch 'ServerOpenMC:master' into shops
gab4000 Nov 12, 2025
f1dd92f
refactor: rename shop-related classes and improve database management
gab4000 Nov 21, 2025
cbb0f11
Merge branch 'ServerOpenMC:master' into shops
gab4000 Nov 21, 2025
87ef980
Merge branch 'master' into shops
gab4000 Dec 7, 2025
f41f438
Merge branch 'ServerOpenMC:master' into shops
gab4000 Dec 13, 2025
a7c1944
feat: add admin shop management and enhance ShopManager functionality
gab4000 Dec 13, 2025
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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ java {
}

paperweight {
addServerDependencyTo = configurations.named(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME).map { [it] as Set }
addServerDependencyTo = configurations.named(JavaPlugin.COMPILE_ONLY_CONFIGURATION_NAME).map { [it] as Set }
}

tasks.withType(JavaCompile).configureEach {
Expand Down Expand Up @@ -134,4 +134,4 @@ tasks.shadowJar {

tasks.test {
useJUnitPlatform()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,10 @@ void onPlayerDeath(PlayerDeathEvent event) {
* Méthode qui permet de verifier si l'item est celui avec qui on interagit
*/
private static boolean isItemInteraction(ItemStack item) {
if (item == null || item.getType() == Material.AIR)
return false;
if (item == null || item.getType() == Material.AIR) return false;

ItemMeta meta = item.getItemMeta();
if (meta == null)
return false;
if (meta == null) return false;

if (item.hasItemMeta()) {
PersistentDataContainer data = item.getItemMeta().getPersistentDataContainer();
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/fr/openmc/core/CommandsManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import fr.openmc.core.commands.fun.Playtime;
import fr.openmc.core.commands.utils.*;
import fr.openmc.core.features.adminshop.AdminShopCommand;
import fr.openmc.core.features.corporation.commands.ShopAdminCommand;
import fr.openmc.core.features.corporation.commands.ShopCommand;
import fr.openmc.core.features.credits.CreditsCommand;
import fr.openmc.core.features.cube.CubeCommands;
import fr.openmc.core.features.events.halloween.commands.HalloweenCommands;
Expand Down Expand Up @@ -59,6 +61,8 @@ private static void registerCommands() {
new Cooldowns(),
new CreditsCommand(),
new CubeCommands(),
new ShopCommand(),
new ShopAdminCommand(),
new HalloweenCommands()
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fr/openmc/core/ListenersManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import fr.openmc.api.input.ChatInput;
import fr.openmc.api.input.location.ItemInteraction;
import fr.openmc.core.features.corporation.listener.ShopListener;
import fr.openmc.core.features.cube.listeners.CubeListener;
import fr.openmc.core.features.cube.listeners.RepulseEffectListener;
import fr.openmc.core.features.cube.multiblocks.MultiBlocksListeners;
Expand Down Expand Up @@ -38,6 +39,7 @@ public static void init() {
new PlayerSettingsManager(),
new InteractListener(),
new AywenCapListener(),
new ShopListener(),
new NoMoreRabbit(),
new ArmorListener(),
new SpawnerExtractorListener()
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/fr/openmc/core/OMCPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import fr.openmc.core.features.city.sub.statistics.CityStatisticsManager;
import fr.openmc.core.features.city.sub.war.WarManager;
import fr.openmc.core.features.contest.managers.ContestManager;
import fr.openmc.core.features.corporation.manager.ShopManager;
import fr.openmc.core.features.cube.multiblocks.MultiBlockManager;
import fr.openmc.core.features.displays.TabList;
import fr.openmc.core.features.displays.bossbar.BossbarManager;
Expand Down Expand Up @@ -153,6 +154,7 @@ public void loadWithItemsAdder() {
QuestsManager.init();
CityManager.init();
ContestManager.init();
ShopManager.init();
DreamManager.init();
MultiBlockManager.init();
if (WorldGuardHook.isHasWorldGuard()) {
Expand Down Expand Up @@ -216,6 +218,9 @@ public void onDisable() {

// - Cooldowns
DynamicCooldownManager.saveCooldowns();

// - Shops
ShopManager.shutdown();


if (!OMCPlugin.isUnitTestVersion()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package fr.openmc.core.disabled.corporation.manager;
package fr.openmc.core.disabled.corporation;

import com.j256.ormlite.dao.Dao;
import com.j256.ormlite.dao.DaoManager;
Expand All @@ -10,14 +10,18 @@ import fr.openmc.core.CommandsManager;
import fr.openmc.core.OMCPlugin;
import fr.openmc.core.disabled.corporation.CorpPermission;
import fr.openmc.core.disabled.corporation.MethodState;
import fr.openmc.core.features.city.City;
import fr.openmc.core.features.city.CityManager;
import fr.openmc.core.features.corporation.MethodState;
import fr.openmc.core.disabled.corporation.commands.CompanyCommand;
import fr.openmc.core.disabled.corporation.commands.ShopCommand;
import fr.openmc.core.features.corporation.commands.ShopCommand;
import fr.openmc.core.disabled.corporation.company.Company;
import fr.openmc.core.disabled.corporation.company.CompanyOwner;
import fr.openmc.core.disabled.corporation.data.MerchantData;
import fr.openmc.core.disabled.corporation.listener.CustomItemsCompanyListener;
import fr.openmc.core.disabled.corporation.listener.ShopListener;
import fr.openmc.core.features.corporation.data.MerchantData;
import fr.openmc.core.features.corporation.listener.ShopListener;
import fr.openmc.core.disabled.corporation.models.*;
import fr.openmc.core.features.corporation.manager.PlayerShopManager;
import fr.openmc.core.features.corporation.manager.ShopManager;
import fr.openmc.core.disabled.corporation.shops.Shop;
import fr.openmc.core.disabled.corporation.shops.ShopItem;
import fr.openmc.core.disabled.corporation.shops.Supply;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package fr.openmc.core.disabled.corporation.commands;
import fr.openmc.core.features.city.City;
import fr.openmc.core.features.city.CityManager;
import fr.openmc.core.disabled.corporation.CorpPermission;
import fr.openmc.core.disabled.corporation.MethodState;
import fr.openmc.core.features.corporation.MethodState;
import fr.openmc.core.disabled.corporation.company.Company;
import fr.openmc.core.disabled.corporation.company.CompanyOwner;
import fr.openmc.core.disabled.corporation.manager.CompanyManager;
import fr.openmc.core.disabled.corporation.manager.PlayerShopManager;
import fr.openmc.core.disabled.corporation.CompanyManager;
import fr.openmc.core.features.corporation.manager.PlayerShopManager;
import fr.openmc.core.disabled.corporation.menu.company.CompanyBaltopMenu;
import fr.openmc.core.disabled.corporation.menu.company.CompanyMenu;
import fr.openmc.core.disabled.corporation.menu.company.CompanySearchMenu;
Expand Down
Loading
Loading