Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
830b400
ajout de la ""base""
Nocolm Sep 13, 2026
0deb10d
Merge branch 'refs/heads/master' into Halloween
Nocolm Sep 14, 2026
d101e83
Merge branch 'refs/heads/master' into Halloween
Nocolm Sep 14, 2026
caef5ab
Merge branch 'refs/heads/master' into Halloween
Nocolm Sep 14, 2026
3d5f3ce
update 1 pc <-> pc lycée
Nocolm Sep 14, 2026
0c363e3
Merge branch 'ServerOpenMC:master' into Halloween
Nocolm Sep 19, 2026
635ca6d
add Managers, base Dimension, start of the menus
Nocolm Sep 19, 2026
06f3e1c
grosse update, ajout menu shop, bcp de Todo, DB...
Nocolm Sep 20, 2026
38bf0e4
move items and font to omc_halloween + SquareRegion
Nocolm Sep 22, 2026
c019585
remove doublon
Nocolm Sep 22, 2026
c855ad9
Merge branch 'master' into Halloween
Nocolm Sep 22, 2026
aa66001
add getRandom for list<T>
Nocolm Oct 13, 2026
f51c89f
little change to Region
Nocolm Oct 13, 2026
92bddc1
little change to Region 2
Nocolm Oct 13, 2026
99fb67d
implementation of better structure with WEHook
Nocolm Oct 13, 2026
d559452
move package
Nocolm Oct 13, 2026
c88abcb
big update for the events, add menus, floor and mob management...
Nocolm Oct 13, 2026
febcb3e
Merge branch 'master' into Halloween
Nocolm Oct 13, 2026
cf590c5
new menus ( je m'aime )
Nocolm Oct 21, 2026
02f2602
Add new utils to EnumUtils
Nocolm Oct 23, 2026
3b02eda
gros commit pour 1er test, j'aurai du en faire des petits arrg
Nocolm Oct 23, 2026
3e47bf4
fix ImmutableCollections error
Nocolm Oct 23, 2026
6b87bc2
fix menu names
Nocolm Oct 23, 2026
d1b3ba1
fix menus textures
Nocolm Oct 23, 2026
83af94d
remove old candy from daily_event
Nocolm Oct 23, 2026
80e30d2
update config
Nocolm Oct 23, 2026
b4c1055
fix halloween root plush ( change name later )
Nocolm Oct 23, 2026
05cd2fb
fix LeaderBoard error
Nocolm Oct 23, 2026
10c475a
fix Menus
Nocolm Oct 23, 2026
704998e
Merge branch 'master' into Halloween
Nocolm Oct 25, 2026
e21382d
Change StructureRegistry ( ça marche ! )
Nocolm Oct 25, 2026
d7de00c
add infos to sb
Nocolm Oct 25, 2026
a5e0f18
add infos to sb
Nocolm Oct 25, 2026
f7508e2
fix, add NPC and add some translations...
Nocolm Oct 27, 2026
a32bf9c
item translation
Nocolm Oct 28, 2026
faea14d
add limited use of item ( elytra, ender pearl... )
Nocolm Oct 28, 2026
cec2ac2
CustomStructureRegistry Fix
Nocolm Oct 28, 2026
1137038
Fix sb
Nocolm Oct 29, 2026
2d73d5b
Très gros commit déso
Nocolm Oct 29, 2026
eef6a01
Merge branch 'master' into Halloween
Nocolm Oct 29, 2026
84b4445
L'avant dernier commit
Nocolm Oct 29, 2026
58b0c86
Merge remote-tracking branch 'origin/Halloween' into Halloween
Nocolm Oct 29, 2026
fb31ccb
petit ajout et fix
Nocolm Oct 29, 2026
22840f6
translation ( un peu aider par l'ia )
Nocolm Oct 29, 2026
6efe858
fix Listener
Nocolm Oct 29, 2026
4b8d34e
last translation
Nocolm Oct 29, 2026
389292d
new TerrorHouse.schem
Nocolm Oct 29, 2026
d27d897
command pas utiles
Nocolm Oct 29, 2026
370288f
gestion de la mort
Nocolm Oct 29, 2026
3a2735d
effet du diabète ajouté mdr
Nocolm Oct 29, 2026
1461c71
review
Nocolm Oct 30, 2026
120284c
review 2
Nocolm Oct 30, 2026
82dce69
disable pvp
Nocolm Oct 30, 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
17 changes: 14 additions & 3 deletions src/main/java/fr/openmc/api/cooldown/DynamicCooldownManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ public static void cleanup() {
public static void clear(String group) {
cooldowns.forEach((uuid, userCooldowns) -> {
Cooldown removed = userCooldowns.remove(group);
if (removed != null) removed.cancelTask();
clear(removed);
});
cooldowns.entrySet().removeIf(entry -> entry.getValue().isEmpty()); // A test
cooldowns.entrySet().removeIf(entry -> entry.getValue().isEmpty());
}

/**
Expand All @@ -288,8 +288,19 @@ public static void clear(UUID uuid, String group, boolean callEvent) {
if (callEvent) Bukkit.getPluginManager().callEvent(new CooldownEndEvent(uuid, group));

Cooldown removed = userCooldowns.remove(group);
if (removed != null) removed.cancelTask();
clear(removed);
if (userCooldowns.isEmpty()) cooldowns.remove(uuid);
}
}

private static void clear(Cooldown cooldown) {
if (cooldown == null) return;

cooldown.cancelTask();
try {
cooldownDao.delete(cooldown);
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/fr/openmc/api/datapacks/OMCDatapack.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import fr.openmc.api.datapacks.injectors.PackMetadataInjector;
import fr.openmc.core.OMCPlugin;
import fr.openmc.core.utils.FilesUtils;
import fr.openmc.core.utils.file.FilesUtils;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;
import lombok.Getter;
Expand Down
11 changes: 8 additions & 3 deletions src/main/java/fr/openmc/core/OMCPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
import fr.openmc.core.features.economy.TransactionsManager;
import fr.openmc.core.features.events.EventsManager;
import fr.openmc.core.features.events.contents.dailyevents.DailyEventsManager;
import fr.openmc.core.features.events.contents.halloween.managers.HalloweenManager;
import fr.openmc.core.features.events.contents.halloween.festival.HalloweenFestivalManager;
//import fr.openmc.core.features.events.contents.halloween.pumpkin.managers.HalloweenManager;
import fr.openmc.core.features.events.contents.open.OpenManager;
import fr.openmc.core.features.events.contents.weeklyevents.WeeklyEventsManager;
import fr.openmc.core.features.events.contents.weeklyevents.contents.contest.ContestParticlesUtils;
Expand Down Expand Up @@ -63,6 +64,7 @@
import fr.openmc.core.hooks.github.GitHubHook;
import fr.openmc.core.hooks.itemsadder.ItemsAdderHook;
import fr.openmc.core.listeners.ItemsAddersListener;
import fr.openmc.core.registry.structures.model.CustomStructureManager;
import fr.openmc.core.utils.text.MotdUtils;
import io.papermc.paper.datapack.Datapack;
import lombok.Getter;
Expand Down Expand Up @@ -112,14 +114,16 @@ public class OMCPlugin extends JavaPlugin {
AdminShopManager::new,
HelpConfigManager::new,
() -> new AnimationsManager(),
() -> new HalloweenManager(),
// () -> new HalloweenManager(), pas cette année mon vieux
QuestProgressSaveManager::new,
MotdUtils::new,
MascotsManager::new,
PlayerSettingsManager::new,
MailboxManager::new,
DiscordLinkManager::new,
ProfileManager::new,
CustomStructureManager::new,
() -> new HalloweenFestivalManager(),
() -> new ElevatorManager(),
() -> new CorpseManager(),
QuestsManager::new,
Expand Down Expand Up @@ -152,7 +156,8 @@ public class OMCPlugin extends JavaPlugin {
new WorldGuardHook(),
new ItemsAdderHook(),
new FancyNpcsHook(),
new GitHubHook()
new GitHubHook(),
new WorldEditHook()
));

@Override
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/fr/openmc/core/OMCRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import fr.openmc.core.registry.loottable.CustomLootTableRegistry;
import fr.openmc.core.registry.mobs.CustomMobRegistry;
import fr.openmc.core.registry.regions.CustomRegionRegistry;
import fr.openmc.core.registry.structures.CustomStructureRegistry;
import fr.openmc.riftengine.api.registry.scanner.ScannerRegistry;
import fr.openmc.core.registry.worldtemplates.WorldTemplateRegistry;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
Expand All @@ -32,6 +33,7 @@ public final class OMCRegistry {
public static CustomLootTableRegistry CUSTOM_LOOT_TABLES;
public static CustomAmbientRegistry CUSTOM_AMBIENTS;
public static CustomLootboxRegistry CUSTOM_LOOTBOXES;
public static CustomStructureRegistry CUSTOM_STRUCTURES;
public static CustomRegionRegistry CUSTOM_REGIONS;
public static WorldTemplateRegistry WORLD_TEMPLATES;

Expand Down Expand Up @@ -62,6 +64,8 @@ public final class OMCRegistry {
RegistryLoadingType.AFTER_IA),
new RegistryContext(() -> CUSTOM_MOBS = new CustomMobRegistry(),
RegistryLoadingType.AFTER_IA),
new RegistryContext(() -> CUSTOM_STRUCTURES = new CustomStructureRegistry(),
RegistryLoadingType.AFTER_IA),
new RegistryContext(() -> WORLD_TEMPLATES = new WorldTemplateRegistry(),
RegistryLoadingType.BOOTSTRAP, RegistryLoadingType.RUNTIME),
new RegistryContext(() -> WEEKLY_EVENTS = new WeeklyEventsRegistry(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fr.openmc.core.bootstrap.integration;

import fr.openmc.core.utils.FilesUtils;
import fr.openmc.core.utils.file.FilesUtils;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;
import io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fr.openmc.core.bootstrap.integration;

import fr.openmc.core.utils.FilesUtils;
import fr.openmc.core.utils.file.FilesUtils;
import io.papermc.paper.plugin.bootstrap.BootstrapContext;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import fr.openmc.core.features.dimopener.listener.DimensionAccessListener;
import fr.openmc.core.features.economy.EconomyManager;
import fr.openmc.core.registry.items.CustomItem;
import fr.openmc.core.utils.FilesUtils;
import fr.openmc.core.utils.file.FilesUtils;
import fr.openmc.core.utils.text.messages.MessageType;
import fr.openmc.core.utils.text.messages.MessagesManager;
import fr.openmc.core.utils.text.messages.Prefix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ private InfoSwapper getNextInfo() {

infos = infos.stream().filter(InfoSwapper::isActive).toList();

if (infos.size() <= 1)
if (infos.size() == 1)
return infos.getFirst();

if (infos.isEmpty())
return null;

currentSwappingInfoIndex = (currentSwappingInfoIndex + 1) % infos.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
import fr.openmc.core.features.corpse.npc.CorpseNPCManager;
import fr.openmc.core.features.displays.scoreboards.BaseScoreboard;
import fr.openmc.core.features.economy.EconomyManager;
import fr.openmc.core.features.events.contents.halloween.managers.HalloweenManager;
import fr.openmc.core.features.events.contents.halloween.pumpkin.managers.HalloweenManager;
import fr.openmc.core.features.events.sbinfos.ContestInfos;
import fr.openmc.core.features.events.sbinfos.HalloweenFestivalInfos;
import fr.openmc.core.hooks.FancyNpcsHook;
import fr.openmc.core.hooks.LuckPermsHook;
import fr.openmc.core.hooks.WorldGuardHook;
Expand Down Expand Up @@ -71,7 +72,7 @@ public void update(Player player, SternalBoard board) {
@Override
protected List<InfoSwapper> getSwapping() {
return List.of(
//new HalloweenFestivalInfos(),
new HalloweenFestivalInfos(),
new ContestInfos()
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package fr.openmc.core.features.events.contents.halloween.festival;

import fr.openmc.core.registry.items.CustomItem;
import fr.openmc.core.registry.items.CustomItemMeta;
import fr.openmc.core.utils.text.messages.TranslationManager;
import lombok.Getter;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import org.jspecify.annotations.NonNull;

import java.util.HashMap;
import java.util.Map;

public class CandyItem extends CustomItem {

@Getter
public int diabetesIndex;
public Material baseItem;

public static final Map<String, CandyItem> candies = new HashMap<>();

public CandyItem(String candyID , int diabetesIndex, Material baseItem) {
super(new CustomItemMeta(candyID));
this.diabetesIndex = diabetesIndex;
this.baseItem = baseItem;
candies.put(candyID, this);
}

@Override
public @NonNull ItemStack getVanilla() {
ItemStack item = new ItemStack(baseItem);
item.editMeta(meta -> meta.itemName(
TranslationManager.translation("itemsadder." + super.getId().replace(":", ".") + ".name")
));
return item;
}
}
Loading
Loading