Compare commits
6 Commits
dev/1.21.5
...
build/1.20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db4e5ab4e | ||
|
|
9f237a1a1f | ||
|
|
e0dbcaf4ba | ||
|
|
8ac2a7fa39 | ||
|
|
63d3a43571 | ||
|
|
66cc466648 |
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
@@ -10,7 +10,6 @@ on:
|
||||
env:
|
||||
ORG_NAME: PlazmaMC
|
||||
MC_VERSION: 1.20.2
|
||||
MAIN_BRANCH: ver/1.20.1
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -23,16 +22,31 @@ jobs:
|
||||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')"
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Setup Variables
|
||||
id: setup
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: echo "branch=${BRANCH##*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout javadocs
|
||||
uses: actions/checkout@v4
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
continue-on-error: true
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
path: javadoc
|
||||
ref: main
|
||||
ref: ${{ steps.setup.outputs.branch }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Checkout javadocs
|
||||
uses: actions/checkout@v4
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
with:
|
||||
repository: PlazmaMC/Javadocs
|
||||
path: jdmain
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
@@ -62,30 +76,33 @@ jobs:
|
||||
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
||||
|
||||
- name: Update Javadoc
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
continue-on-error: true
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
run: |
|
||||
if [ ! -d "javadoc" ]; then
|
||||
mkdir javadoc
|
||||
cd javadoc
|
||||
git init && git branch -m ${{ steps.setup.outputs.branch }}
|
||||
git remote add origin https://github.com/PlazmaMC/Javadocs
|
||||
fi
|
||||
|
||||
(cd Plazma-API/build/docs/javadoc && tar c .) | (cd javadoc && tar xf -)
|
||||
cd javadoc
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push -f
|
||||
|
||||
cd ../jdmain
|
||||
git submodule update
|
||||
git add . && git commit -m "Update Javadocs"
|
||||
git push
|
||||
|
||||
- name: Publish Packages
|
||||
if: github.ref_name == env.MAIN_BRANCH
|
||||
if: startsWith(github.ref_name, 'ver/') || startsWith(github.ref_name, 'dev/')
|
||||
run: |
|
||||
export GITHUB_USERNAME=${{ env.ORG_NAME }}
|
||||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
|
||||
./gradlew publish --stacktrace
|
||||
|
||||
- name: Upload Artifacts
|
||||
if: "!startsWith(github.ref_name, 'ver/')"
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artifacts
|
||||
path: |
|
||||
build/libs
|
||||
Plazma-API/build/docs/javadoc
|
||||
|
||||
- name: Get Release Number
|
||||
if: startsWith(github.ref_name, 'ver/')
|
||||
run: echo "RELEASE=$(git ls-remote --tags origin | grep "build/${{ env.MC_VERSION }}" | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
@@ -40,7 +40,7 @@ allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
name = "githubPackage"
|
||||
url = uri("https://maven.pkg.github.com/PlazmaMC/Plazma")
|
||||
url = uri("https://maven.pkg.github.com/PlazmaMC/PlazmaBukkit")
|
||||
|
||||
credentials {
|
||||
username = System.getenv("GITHUB_USERNAME")
|
||||
|
||||
@@ -107,6 +107,7 @@ abstract class PurpurUpdateTask : Task() {
|
||||
copySource(paper)
|
||||
Git(paper)("add", ".").executeOut()
|
||||
Git(paper)("commit", "-m", "Vanilla Sources", "--author=Vanilla <auto@mated.null>").executeOut()
|
||||
Thread.sleep(1_000)
|
||||
paper.resolve(".git").toFile().copyRecursively(dotGit, overwrite = true)
|
||||
|
||||
Git(it).addCommit("Pufferfish Server Changes\n\n$pufferfishCommit", "--author=Kevin Raneri <kevin.raneri@gmail.com>")
|
||||
@@ -154,4 +155,15 @@ abstract class PurpurUpdateTask : Task() {
|
||||
}
|
||||
}
|
||||
|
||||
abstract class PurpurBuildTask : Task() {
|
||||
|
||||
private val property = project.extensions["alwaysUpToDate"] as AlwaysUpToDateExtension
|
||||
|
||||
@TaskAction
|
||||
fun build() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ shadow = "8.1.1"
|
||||
paperweight = "1.5.10"
|
||||
paperclip = "3.0.3"
|
||||
decompiler = "2.0.627.2"
|
||||
remapper = "0.3.0:fat"
|
||||
remapper = "0.10.0"
|
||||
|
||||
[libraries]
|
||||
remapper = { group = "net.fabricmc", name = "tiny-remapper", version.ref="remapper" }
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 41d7b75e904b94073dfcd12b776a7759a963b66f..96974f191c13424d72839d85dfa2a6c29b9f4d1d 100644
|
||||
index 41d7b75e904b94073dfcd12b776a7759a963b66f..c37b8a63b050dcc2ad2b33955017df48120c4393 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,11 +9,13 @@ java {
|
||||
@@ -108,7 +108,7 @@ index 41d7b75e904b94073dfcd12b776a7759a963b66f..96974f191c13424d72839d85dfa2a6c2
|
||||
+ "https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/${common.log4j.api.orNull?.version}/",
|
||||
// Paper end
|
||||
- "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3", // Paper
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.provider.orNull?.version}", // Paper
|
||||
+ "https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/${common.maven.transport.orNull?.version}", // Paper
|
||||
+ // Plazma end
|
||||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -49,7 +49,7 @@ index 8cde30544e14f8fc2dac32966ae3c21f8cf3a551..7d80d2cf5d607d6051e99e4b08bc1b76
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199f27babbd 100644
|
||||
index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..7167c08053071f71c45162d455efed86ffcd2c6e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -20,7 +20,7 @@ import java.util.stream.StreamSupport;
|
||||
@@ -68,7 +68,7 @@ index 462a6eed350fd660ddaf25d567bb6e97b77d0b2b..fec95437c1ad602f64c4d4d02c276199
|
||||
- String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
|
||||
- final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur
|
||||
+ String[] parts = serverVersion.substring("git-Plazma-".length()).split("[-\\s]"); // Purpur // Plazma
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/Plazma", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PlazmaMC/PlazmaBukkit", "ver/" + getMinecraftVersion(), parts[0]); // Purpur // Plazma
|
||||
final Component history = getHistory();
|
||||
|
||||
return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur
|
||||
|
||||
@@ -5,14 +5,16 @@ Subject: [PATCH] Add more metrics
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131acec5c2fc 100644
|
||||
index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..057fb0be810930b1d1a18d7d572c18ac066ac849 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
||||
@@ -636,16 +636,52 @@ public class Metrics {
|
||||
@@ -636,38 +636,59 @@ public class Metrics {
|
||||
return map;
|
||||
}));
|
||||
|
||||
+ // Plazma start
|
||||
- metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
- Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ // Plazma start - Add more metrics information
|
||||
+ metrics.addCustomChart(new DrilldownPie("datapacks", () -> {
|
||||
+ int datapacks = Bukkit.getDatapackManager().getEnabledPacks().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(datapacks), 1);
|
||||
@@ -22,13 +24,19 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ else if (datapacks <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (datapacks <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (datapacks <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else return Collections.singletonMap("50+", entry);
|
||||
+ else if (datapacks <= 100) return Collections.singletonMap("51+", entry);
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDE2E", entry);
|
||||
+ }));
|
||||
+
|
||||
+ List<Plugin> plugins = Arrays.stream(Bukkit.getPluginManager().getPlugins()).toList();
|
||||
+
|
||||
|
||||
- // count legacy plugins
|
||||
- int legacy = 0;
|
||||
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
- if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
|
||||
- legacy++;
|
||||
- }
|
||||
- }
|
||||
+ metrics.addCustomChart(new DrilldownPie("plugins", () -> {
|
||||
+ int pluginCount = (int) plugins.stream().filter(Plugin::isEnabled).count();
|
||||
+ int pluginCount = Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(Plugin::isEnabled).toList().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(pluginCount), 1);
|
||||
+
|
||||
+ if (pluginCount == 0) return Collections.singletonMap("0", entry);
|
||||
@@ -36,11 +44,30 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ else if (pluginCount <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (pluginCount <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (pluginCount <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else return Collections.singletonMap("50+", entry);
|
||||
+ else if (pluginCount <= 100) return Collections.singletonMap("51-100", entry);
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDE2E", entry);
|
||||
+ }));
|
||||
+
|
||||
|
||||
- // insert real value as lower dimension
|
||||
- Map<String, Integer> entry = new HashMap<>();
|
||||
- entry.put(String.valueOf(legacy), 1);
|
||||
-
|
||||
- // create buckets as higher dimension
|
||||
- if (legacy == 0) {
|
||||
- map.put("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
- } else if (legacy <= 5) {
|
||||
- map.put("1-5", entry);
|
||||
- } else if (legacy <= 10) {
|
||||
- map.put("6-10", entry);
|
||||
- } else if (legacy <= 25) {
|
||||
- map.put("11-25", entry);
|
||||
- } else if (legacy <= 50) {
|
||||
- map.put("26-50", entry);
|
||||
- } else {
|
||||
- map.put("50+ \uD83D\uDE2D", entry); // :cry:
|
||||
- }
|
||||
+ metrics.addCustomChart(new DrilldownPie("disabled_plugins", () -> {
|
||||
+ int disabled = (int) plugins.stream().filter(java.util.function.Predicate.not(Plugin::isEnabled)).count();
|
||||
+ int disabled = Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(it -> !it.isEnabled()).toList().size();
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(disabled), 1);
|
||||
+
|
||||
+ if (disabled == 0) return Collections.singletonMap("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
@@ -48,22 +75,24 @@ index 7d80d2cf5d607d6051e99e4b08bc1b76098a79da..f006c867ad0765e0f52a629729ab131a
|
||||
+ else if (disabled <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (disabled <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (disabled <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (disabled <= 100) return Collections.singletonMap("50-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else if (disabled <= 100) return Collections.singletonMap("51-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
+ }));
|
||||
+ // Plazma end
|
||||
|
||||
- return map;
|
||||
+ metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
+ int legacy = (int) Arrays.stream(Bukkit.getPluginManager().getPlugins()).filter(p -> CraftMagicNumbers.isLegacy(p.getDescription())).count(); // Plazma
|
||||
+ Map<String, Integer> entry = Collections.singletonMap(String.valueOf(legacy), 1);
|
||||
+
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("legacy_plugins", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
+ if (legacy == 0) return Collections.singletonMap("0 \uD83D\uDE0E", entry); // :sunglasses:
|
||||
+ else if (legacy <= 5) return Collections.singletonMap("1-5", entry);
|
||||
+ else if (legacy <= 10) return Collections.singletonMap("6-10", entry);
|
||||
+ else if (legacy <= 25) return Collections.singletonMap("11-25", entry);
|
||||
+ else if (legacy <= 50) return Collections.singletonMap("26-50", entry);
|
||||
+ else if (legacy <= 100) return Collections.singletonMap("51-100 \uD83D\uDE2D", entry); // :cry:
|
||||
+ else return Collections.singletonMap("101+ \uD83D\uDC80", entry); // :skull:
|
||||
}));
|
||||
+ // Plazma end - Add more metrics information
|
||||
}
|
||||
|
||||
// count legacy plugins
|
||||
- int legacy = 0;
|
||||
- for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
- if (CraftMagicNumbers.isLegacy(plugin.getDescription())) {
|
||||
- legacy++;
|
||||
- }
|
||||
- }
|
||||
+ int legacy = (int) plugins.stream().filter(p -> CraftMagicNumbers.isLegacy(p.getDescription())).count(); // Plazma
|
||||
|
||||
// insert real value as lower dimension
|
||||
Map<String, Integer> entry = new HashMap<>();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Avoid double I/O operation on load player file
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
index 36af81f0957d17e170d229059c66f4eb4539dfeb..b4b74bff0579b919266e91464b36c9381342b677 100644
|
||||
index 36af81f0957d17e170d229059c66f4eb4539dfeb..bf9a4571b05c9e2bacb6b26c7b24d33c6b4830f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||
@@ -56,7 +56,8 @@ public class PlayerDataStorage {
|
||||
@@ -14,7 +14,7 @@ index 36af81f0957d17e170d229059c66f4eb4539dfeb..b4b74bff0579b919266e91464b36c938
|
||||
boolean usingWrongFile = false;
|
||||
- if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
||||
+ boolean isNormalFile = file.exists() && file.isFile(); // Plazma - Avoid double I/O operation
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && isNormalFile ) // Paper - Check online mode first // Plazma - Avoid double I/O operation
|
||||
+ if ( org.bukkit.Bukkit.getOnlineMode() && !isNormalFile ) // Paper - Check online mode first // Plazma - Avoid double I/O operation
|
||||
{
|
||||
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||||
if ( file.exists() )
|
||||
|
||||
@@ -82,17 +82,17 @@ index 9d6db4a378036559efab91c8b7dcf2a6b0c2cce6..4d9f73add791cef03cc7aeaf1598a73c
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 770b959d9e51ef0645415d5a0d7d79b7031abd66..82670c8bc74cbb208a91cec433498b823e86ce2e 100644
|
||||
index 770b959d9e51ef0645415d5a0d7d79b7031abd66..f902505c850b9ea68733bd40e62b02b40a235e42 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -682,6 +682,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -681,6 +681,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public boolean enforceSecureProfile() {
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.enabled) return false; // Plazma - Implement No Chat Reports
|
||||
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
|
||||
// Paper start - fix secure profile with proxy online mode
|
||||
return dedicatedserverproperties.enforceSecureProfile
|
||||
&& io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
index b19c59a87d4136da583a0b687f6b27fef3456f09..b54372c32845d2bc340951c0ea88d480efc1dd6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user