Uplift Paper version to 1.21.10

Use the ListedPlayer method to set messages under online players for the server list

Upgrade Gradle to 9.2.0

Update the getBuildNumber function in build.gradle.kts to use non-deprecated method to fetch build numbers
This commit is contained in:
Focusvity
2025-11-05 18:34:12 +11:00
parent be6fa5a41a
commit a8c70933e7
5 changed files with 24 additions and 28 deletions
@@ -1,9 +1,12 @@
package dev.plex.listener.impl;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent.ListedPlayerInfo;
import dev.plex.listener.PlexListener;
import dev.plex.util.PlexUtils;
import dev.plex.util.RandomUtil;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import net.kyori.adventure.text.Component;
import org.bukkit.Bukkit;
@@ -32,15 +35,16 @@ public class ServerListener extends PlexListener
{
event.motd(PlexUtils.mmDeserialize(baseMotd.trim()));
}
/* - Broken on 1.20.6
if (plugin.config.contains("server.sample"))
{
List<String> samples = plugin.config.getStringList("server.sample");
if (!samples.isEmpty())
{
event.getPlayerSample().clear();
event.getPlayerSample().addAll(samples.stream().map(string -> string.replace("&", "§")).map(Bukkit::createProfile).toList());
event.getListedPlayers().clear();
event.getListedPlayers().addAll(samples.stream().map(string -> string.replace("&", "§"))
.map(str -> new ListedPlayerInfo(str, UUID.randomUUID())).toList());
}
}*/
}
}
}
@@ -119,11 +119,7 @@ public class PlexUtils implements PlexBase
public static boolean hasVanishPlugin()
{
if (Bukkit.getPluginManager().isPluginEnabled("SuperVanish") || Bukkit.getPluginManager().isPluginEnabled("PremiumVanish"))
{
return true;
}
return false;
return Bukkit.getPluginManager().isPluginEnabled("SuperVanish") || Bukkit.getPluginManager().isPluginEnabled("PremiumVanish");
}
public static boolean isPluginCMD(String cmd, String pluginName)