mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-03 21:16:55 +00:00
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:
+2
-2
@@ -3,11 +3,11 @@ plugins {
|
||||
id("maven-publish")
|
||||
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.10"
|
||||
id("net.kyori.blossom") version "2.1.0"
|
||||
id("com.gradleup.shadow") version "9.0.0-rc1"
|
||||
id("com.gradleup.shadow") version "9.2.2"
|
||||
}
|
||||
|
||||
group = "dev.plex"
|
||||
version = "1.5"
|
||||
version = "1.6"
|
||||
description = "Plex"
|
||||
|
||||
subprojects {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
+12
-16
@@ -1,5 +1,4 @@
|
||||
import net.minecrell.pluginyml.paper.PaperPluginDescription
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
@@ -14,15 +13,15 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
library("org.projectlombok:lombok:1.18.38")
|
||||
library("org.json:json:20250107")
|
||||
library("commons-io:commons-io:2.19.0")
|
||||
library("redis.clients:jedis:6.0.0")
|
||||
library("org.mariadb.jdbc:mariadb-java-client:3.5.4")
|
||||
library("com.zaxxer:HikariCP:6.3.0")
|
||||
library("org.projectlombok:lombok:1.18.42")
|
||||
library("org.json:json:20250517")
|
||||
library("commons-io:commons-io:2.20.0")
|
||||
library("redis.clients:jedis:7.0.0")
|
||||
library("org.mariadb.jdbc:mariadb-java-client:3.5.6")
|
||||
library("com.zaxxer:HikariCP:6.3.3")
|
||||
library("org.apache.maven.resolver:maven-resolver-transport-http:1.9.24")
|
||||
library("org.jetbrains:annotations:26.0.2")
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.7-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.10-R0.1-SNAPSHOT")
|
||||
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") {
|
||||
exclude("org.bukkit", "bukkit")
|
||||
}
|
||||
@@ -34,7 +33,7 @@ dependencies {
|
||||
implementation("org.bstats:bstats-bukkit:3.1.0")
|
||||
|
||||
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.38")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.42")
|
||||
}
|
||||
|
||||
group = rootProject.group
|
||||
@@ -94,17 +93,14 @@ paper {
|
||||
}
|
||||
|
||||
fun getBuildNumber(): String {
|
||||
val stdout = ByteArrayOutputStream()
|
||||
try {
|
||||
exec {
|
||||
return try {
|
||||
providers.exec {
|
||||
commandLine("git", "rev-list", "HEAD", "--count")
|
||||
standardOutput = stdout
|
||||
isIgnoreExitValue = true
|
||||
}
|
||||
}.standardOutput.asText.get().trim()
|
||||
} catch (e: GradleException) {
|
||||
logger.error("Couldn't determine build number because Git is not installed. " + e.message)
|
||||
"unknown"
|
||||
}
|
||||
return if (stdout.size() > 0) stdout.toString().trim() else "unknown"
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user