Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1752bbd
Implement UniversalScheduler Folia Support
R00tB33rMan Aug 20, 2025
3ee0889
Revert import modification
R00tB33rMan Aug 20, 2025
7f75a29
Codestyle change
R00tB33rMan Aug 20, 2025
a6ee4bb
Correct/adjust Javadoc
R00tB33rMan Aug 23, 2025
cd40a01
Correct scheduling format for all classes
R00tB33rMan Aug 23, 2025
ed06ace
Implement custom logic, so I can deprecate the other DeluxeMenus branch
R00tB33rMan Sep 3, 2025
b3648cb
Upstream
R00tB33rMan Sep 8, 2025
43294e1
Upstream
R00tB33rMan Sep 8, 2025
c0fd08d
Make click actions "secure," so duplicate actions cannot be executed …
R00tB33rMan Sep 14, 2025
f3e0e70
Merge branch 'folia-merge' into folia-private
R00tB33rMan Sep 14, 2025
7352b26
Rebase
R00tB33rMan Sep 14, 2025
26ec6b6
Reference viewer directly
R00tB33rMan Sep 14, 2025
10be282
Upstream
R00tB33rMan Sep 14, 2025
fcebae1
Upstream
R00tB33rMan Oct 4, 2025
1952544
Upstream
R00tB33rMan Oct 4, 2025
02aa131
This weird implementation is not a DeluxeMenus "responsibility"
R00tB33rMan Oct 7, 2025
8c57ddf
Upstream
R00tB33rMan Oct 7, 2025
b30911c
Rebase
R00tB33rMan Oct 7, 2025
873ca20
Schedule command registration globally
R00tB33rMan Oct 25, 2025
b78d8b4
Upstream
R00tB33rMan Oct 25, 2025
d88ae39
Upstream
R00tB33rMan Nov 26, 2025
a975f7d
Rebased Upstream
R00tB33rMan Nov 26, 2025
9a48403
Upstream
R00tB33rMan Mar 15, 2026
66837b1
Rebase
R00tB33rMan Mar 15, 2026
22baa99
Upstream
R00tB33rMan Mar 15, 2026
b34ba60
Merge remote-tracking branch 'origin/upstream' into folia-merge
R00tB33rMan Apr 20, 2026
ee277cb
Fix compilation (this will probably be needed for upstream for newer …
R00tB33rMan Apr 20, 2026
44a7cb5
Finish rebase
R00tB33rMan Apr 20, 2026
e3d0ef3
Simplify scheduling for need-only actions
R00tB33rMan Apr 20, 2026
7138a02
Upstream
R00tB33rMan Apr 20, 2026
00907ba
Rebase
R00tB33rMan Apr 20, 2026
f33f1b3
Upstream
R00tB33rMan Apr 21, 2026
0087e5e
Upstream finalization
R00tB33rMan Apr 21, 2026
507e257
Modernization
R00tB33rMan Apr 21, 2026
933e0dc
Fix Paper support fully
R00tB33rMan Apr 22, 2026
52d82a7
Fix Paper plugin dependency classpath
MrVaylis May 3, 2026
1c88442
Upstream
R00tB33rMan May 15, 2026
f71cd71
Upstream
R00tB33rMan May 27, 2026
b391beb
Rebase
R00tB33rMan May 27, 2026
75aed7a
Upstream
R00tB33rMan Jul 26, 2026
2b317c9
Bump relevant dependencies
R00tB33rMan Jul 26, 2026
66e8762
Resolve reported issues by upstream
R00tB33rMan Jul 26, 2026
b4313c7
Drop redundant comments
R00tB33rMan Jul 26, 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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ If you would like to contribute towards DeluxeMenus should you take a look at ou
- [CI Server][ci]
- [Spigot Page][spigot]
- [Plugin Statistics][bstats]

20 changes: 11 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
java
id("com.gradleup.shadow") version("8.3.5")
id("com.github.ben-manes.versions") version("0.51.0")
id("com.gradleup.shadow") version("9.6.1")
id("com.github.ben-manes.versions") version("0.54.0")
}

// Change to true when releasing
Expand All @@ -14,18 +14,19 @@ version = "$majorVersion-$minorVersion"

repositories {
mavenCentral()
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.glaremasters.me/repository/public/")
maven("https://nexus.phoenixdevt.fr/repository/maven-public/")
maven("https://repo.momirealms.net/releases/")
maven("https://repo.nexomc.com/releases/")
maven("https://repo.oraxen.com/releases")
maven("https://maven.devs.beer/")
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://jitpack.io")
}

dependencies {
compileOnly(libs.spigot)
compileOnly(libs.paper)

compileOnly(libs.vault)
compileOnly(libs.authlib)
Expand All @@ -48,7 +49,7 @@ dependencies {
implementation(libs.adventure.minimessage)
implementation(libs.bstats)

compileOnly("org.jetbrains:annotations:23.0.0")
compileOnly("org.jetbrains:annotations:26.1.0")
}

tasks {
Expand All @@ -59,14 +60,15 @@ tasks {
relocate("org.bstats", "com.extendedclip.deluxemenus.libs.bstats")
archiveFileName.set("DeluxeMenus-${rootProject.version}.jar")
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
disableAutoTargetJvm()
}

processResources {
filesMatching("plugin.yml") {
filesMatching(listOf("plugin.yml", "paper-plugin.yml")) {
expand("version" to rootProject.version)
}
}
Expand Down
26 changes: 12 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
[versions]
# Compile only
spigot = "1.21.5-R0.1-SNAPSHOT"
paper = "1.21.11-R0.1-SNAPSHOT"
vault = "1.7.1"
authlib = "1.5.25"
headdb = "1.3.2"
craftengine = "26.5"
itemsadder = "3.6.3-beta-14"
nexo = "1.1.0"
oraxen = "1.190.0"
craftengine = "26.7.4"
itemsadder = "4.0.10"
nexo = "1.10.0"
oraxen = "1.212.0"
mythiclib = "1.7.1-SNAPSHOT"
mmoitems = "6.10-SNAPSHOT"
papi = "2.11.6"
mmoitems = "6.10.1-SNAPSHOT"
papi = "2.12.3"
score = "5.25.3.9"
sig = "1.5.0"
bstats = "3.1.0"

bstats = "3.2.1"
# Implementation
nashorn = "15.6"
nashorn = "15.7"
adventure-platform = "4.4.1"
adventure-minimessage = "4.24.0"

adventure-minimessage = "4.26.1"
[libraries]
# Compile only
spigot = { module = "org.spigotmc:spigot-api", version.ref = "spigot" }
paper = { module = "io.papermc.paper:paper-api", version.ref = "paper" }
vault = { module = "com.github.milkbowl:VaultAPI", version.ref = "vault" }
authlib = { module = "com.mojang:authlib", version.ref = "authlib" }
headdb = { module = "com.arcaniax:HeadDatabase-API", version.ref = "headdb" }
craftengine-core = { module = "net.momirealms:craft-engine-core", version.ref = "craftengine"}
craftengine-bukkit = { module = "net.momirealms:craft-engine-bukkit", version.ref = "craftengine"}
itemsadder = { module = "com.github.LoneDev6:api-itemsadder", version.ref = "itemsadder" }
itemsadder = { module = "dev.lone:api-itemsadder", version.ref = "itemsadder" }
nexo = { module = "com.nexomc:nexo", version.ref = "nexo" }
oraxen = { module = "io.th0rgal:oraxen", version.ref = "oraxen" }
mythiclib = { module = "io.lumine:MythicLib-dist", version.ref = "mythiclib"}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 9 additions & 10 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 14 additions & 24 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "DeluxeMenus"

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
43 changes: 40 additions & 3 deletions src/main/java/com/extendedclip/deluxemenus/DeluxeMenus.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import com.extendedclip.deluxemenus.nbt.NbtProvider;
import com.extendedclip.deluxemenus.persistentmeta.PersistentMetaHandler;
import com.extendedclip.deluxemenus.placeholder.Expansion;
import com.extendedclip.deluxemenus.scheduler.UniversalScheduler;
import com.extendedclip.deluxemenus.scheduler.scheduling.schedulers.TaskScheduler;
import com.extendedclip.deluxemenus.updatechecker.UpdateChecker;
import com.extendedclip.deluxemenus.utils.DebugLevel;
import com.extendedclip.deluxemenus.utils.Messages;
Expand All @@ -28,14 +30,23 @@
import org.bstats.charts.SingleLineChart;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.TreeMap;
import java.util.function.Function;
import java.util.logging.Level;
import java.util.stream.Collectors;
Expand All @@ -59,6 +70,9 @@ public class DeluxeMenus extends JavaPlugin {
private final GeneralConfig generalConfig = new GeneralConfig(this);
private DeluxeMenusConfig menuConfig;

@NotNull
private final TaskScheduler scheduler = UniversalScheduler.getScheduler(this);

@Override
public void onLoad() {
if (NbtProvider.isAvailable()) {
Expand Down Expand Up @@ -113,7 +127,7 @@ public void onEnable() {
public void onDisable() {
Bukkit.getMessenger().unregisterOutgoingPluginChannel(this, "BungeeCord");

Bukkit.getScheduler().cancelTasks(this);
scheduler.cancelTasks(this);

if (this.audiences != null) {
this.audiences.close();
Expand Down Expand Up @@ -217,6 +231,10 @@ public GeneralConfig getGeneralConfig() {
return generalConfig;
}

public @NotNull TaskScheduler getScheduler() {
return scheduler;
}

private boolean hookIntoPlaceholderAPI() {
final boolean canHook = Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null;
if (!canHook) {
Expand Down Expand Up @@ -338,7 +356,7 @@ private void setUpMetrics() {
.map(Menu::getMenuItems)
.flatMap(c -> c.values().stream().map(TreeMap::values).flatMap(Collection::stream))
.map(MenuItem::options)
.collect(Collectors.toList());
.toList();
results.put("Byte", options.stream().filter(option -> option.nbtByte().isPresent()).mapToInt(b -> 1).sum());
results.put("Bytes", options.stream().filter(option -> !option.nbtBytes().isEmpty()).mapToInt(b -> 1).sum());
results.put("Short", options.stream().filter(option -> option.nbtShort().isPresent()).mapToInt(s -> 1).sum());
Expand All @@ -351,4 +369,23 @@ private void setUpMetrics() {
return results;
}));
}

public boolean isDupeProtectionFlagged(@NotNull ItemStack item) {
if (!item.hasItemMeta()) return false;

return item.getItemMeta().getPersistentDataContainer()
.has(new NamespacedKey(this, "deluxemenus.item.dupeprotection"), PersistentDataType.BYTE);
}

public void markDupeProtection(@NotNull ItemStack item) {
ItemMeta meta = item.getItemMeta();
if (meta == null) return;

meta.getPersistentDataContainer().set(
new NamespacedKey(this, "deluxemenus.item.dupeprotection"),
PersistentDataType.BYTE,
(byte) 1
);
item.setItemMeta(meta);
}
}
Loading