Compare commits

...
17 Commits
Author SHA1 Message Date
Jason Penilla 10c0e521c3 release: Version 2.1.4 2024-11-06 18:34:48 -07:00
renovate[bot] 831894876c chore(deps): Update dependency com.gradleup.shadow:shadow-gradle-plugin to v8.3.5 2024-11-06 18:29:36 -07:00
renovate[bot] d0618af8ea chore(deps): Update dependency net.neoforged:neoforge to v21.3.11-beta 2024-11-06 18:26:14 -07:00
renovate[bot] d79ead8b13 chore(deps): Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.3 2024-11-06 18:20:09 -07:00
Jason Penilla 9c17676b74 Minecraft 1.21.3 (#243)
* Initial update for Minecraft 1.21.3

* Update adventure-platform-mod

* Update README
2024-11-06 18:17:15 -07:00
renovate[bot] 230ed8142a chore(deps): Update dependency net.fabricmc:fabric-loader to v0.16.7 2024-10-15 12:19:56 -07:00
renovate[bot] f155500f49 chore(deps): Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.2 2024-10-15 12:19:32 -07:00
renovate[bot] 5afd801850 chore(deps): Update dependency org.junit.jupiter:junit-jupiter-engine to v5.11.1 2024-09-25 16:27:25 -07:00
renovate[bot] 2681390aad chore(deps): Update dependency net.fabricmc.fabric-api:fabric-api to v0.105.0+1.21.1 2024-09-25 16:26:22 -07:00
renovate[bot] 3a56d24107 chore(deps): Update dependency net.neoforged:neoforge to v21.1.61 2024-09-25 16:26:13 -07:00
renovate[bot] 13260762d4 chore(deps): Update dependency me.modmuss50:mod-publish-plugin to v0.7.4 2024-09-25 16:26:05 -07:00
renovate[bot] 42a2c56770 chore(deps): Update bstats to v3.1.0 2024-09-25 16:25:58 -07:00
renovate[bot] 921055f2b0 chore(deps): Update dependency gradle to v8.10.2 2024-09-25 16:25:51 -07:00
renovate[bot] a6af02ae63 chore(deps): Update dependency gradle to v8.10.1 2024-09-10 12:27:22 -07:00
Jason Penilla 22ff761ee0 chore(paper): Update comments 2024-09-10 12:26:32 -07:00
Jason Penilla 9a274d1550 fix(paper): Work around Paper bug to fix #211 2024-09-10 10:33:06 -07:00
Jason Penilla af6610cdb2 2.1.4-SNAPSHOT 2024-09-09 19:18:08 -07:00
14 changed files with 62 additions and 31 deletions

No files matched your search

+11 -5
View File
@@ -1,4 +1,4 @@
![MiniMOTD logo](https://i.imgur.com/CXWwjOJ.png)
![MiniMOTD logo](resources/minimotd-logo.png)
[![build](https://img.shields.io/github/checks-status/jpenilla/MiniMOTD/master?label=build)](https://github.com/jpenilla/MiniMOTD/actions) [![latest release](https://img.shields.io/github/v/release/jpenilla/MiniMOTD)](https://github.com/jpenilla/MiniMOTD/releases)
@@ -14,18 +14,24 @@
- MiniMOTD is compatible with Spigot, however many features will not work. It is recommended to use Paper for full compatibility.
- [Sponge API 8](https://www.spongepowered.org/)
- [Sponge API 7](https://www.spongepowered.org/)
- [Fabric](https://fabricmc.net/) (Minecraft 1.21.1, requires [Fabric API](https://modrinth.com/mod/fabric-api))
- [NeoForge](https://neoforged.net/) (Minecraft 1.21.1)
- [Fabric](https://fabricmc.net/) (requires [Fabric API](https://modrinth.com/mod/fabric-api))
- [NeoForge](https://neoforged.net/)
#### Proxy Platforms
- [Velocity](https://velocitypowered.com/)
- [Waterfall](https://papermc.io/downloads#Waterfall) / Bungeecord
#### Downloads
Downloads can be obtained from [GitHub releases](https://github.com/jpenilla/MiniMOTD/releases). There is a separate jar for each platform, as well as a universal jar for all platforms. Paper and Spigot share the same jar, as do Waterfall and Bungeecord.
Downloads can be obtained from any of:
- [Modrinth](https://modrinth.com/plugin/minimotd)
- [Hangar](https://hangar.papermc.io/jmp/MiniMOTD)
- [GitHub releases](https://github.com/jpenilla/MiniMOTD/releases)
There is a separate jar for each platform. Paper and Spigot share the same jar, as do Waterfall and Bungeecord.
The `bukkit-bungeecord` jar is merged from the Paper/Spigot and Waterfall/Bungeecord jars for distribution on Spigot's site.
#### Configuration
See the [wiki](https://github.com/jpenilla/MiniMOTD/wiki) for configuration details
#### Screenshots
![demo motd image](https://i.ibb.co/1LRCV8b/minimotd-demo.png)
![demo motd image](resources/minimotd-demo.png)
+1 -1
View File
@@ -1,5 +1,5 @@
group=xyz.jpenilla
version=2.1.3
version=2.1.4
description=Use MiniMessage text formatting in the server list MOTD.
org.gradle.caching=true
@@ -31,5 +31,5 @@ val bukkitVersions = listOf(
"1.18.2",
"1.19.4",
"1.20.6",
"1.21.1",
"1.21.3",
)
+11 -11
View File
@@ -7,27 +7,27 @@ run-waterfall = { id = "xyz.jpenilla.run-waterfall", version.ref = "run-task" }
[versions]
run-task = "2.3.1"
mod-publish-plugin = "0.7.3"
mod-publish-plugin = "0.7.4"
hangarPublishPlugin = "0.1.2"
indra = "3.1.3"
shadow = "8.3.0"
shadow = "8.3.5"
adventure = "4.17.0"
adventurePlatform = "4.3.4"
adventurePlatformFabric = "5.14.1"
adventurePlatformMod = "6.1.0"
configurate = "4.1.2"
checkerQual = "3.47.0"
slf4j = "1.7.32"
gson = "2.8.0"
bstats = "3.0.3"
bstats = "3.1.0"
paperApi = "1.16.5-R0.1-SNAPSHOT"
paperlib = "1.0.8"
waterfallApi = "1.16-R0.5-SNAPSHOT"
fabricApi = "0.103.0+1.21.1"
fabricLoader = "0.16.5"
minecraft = "1.21.1"
fabricApi = "0.107.0+1.21.3"
fabricLoader = "0.16.7"
minecraft = "1.21.3"
spongeApi7 = "7.2.0"
velocityApi = "3.3.0-SNAPSHOT"
jupiterEngine = "5.11.0"
jupiterEngine = "5.11.3"
[libraries]
adventureBom = { group = "net.kyori", name = "adventure-bom", version.ref = "adventure" }
@@ -36,8 +36,8 @@ adventureTextSerializerPlain = { group = "net.kyori", name = "adventure-text-ser
adventureTextSerializerGson = { group = "net.kyori", name = "adventure-text-serializer-gson" }
adventurePlatformBungeecord = { group = "net.kyori", name = "adventure-platform-bungeecord", version.ref = "adventurePlatform" }
adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventurePlatform" }
adventurePlatformFabric = { group = "net.kyori", name = "adventure-platform-fabric", version.ref = "adventurePlatformFabric" }
adventurePlatformNeoforge = { group = "net.kyori", name = "adventure-platform-neoforge", version = "6.0.0" }
adventurePlatformFabric = { group = "net.kyori", name = "adventure-platform-fabric", version.ref = "adventurePlatformMod" }
adventurePlatformNeoforge = { group = "net.kyori", name = "adventure-platform-neoforge", version.ref = "adventurePlatformMod" }
adventurePlatformSpongeApi = { group = "net.kyori", name = "adventure-platform-spongeapi", version.ref = "adventurePlatform" }
minimessage = { group = "net.kyori", name = "adventure-text-minimessage" }
@@ -64,7 +64,7 @@ fabricApi = { group = "net.fabricmc.fabric-api", name = "fabric-api", version.re
fabricLoader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabricLoader" }
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
neoforge = { module = "net.neoforged:neoforge", version = "21.1.42" }
neoforge = { module = "net.neoforged:neoforge", version = "21.3.11-beta" }
spongeApi7 = { group = "org.spongepowered", name = "spongeapi", version.ref = "spongeApi7" }
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
@@ -25,6 +25,9 @@ package xyz.jpenilla.minimotd.bukkit;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import io.papermc.lib.PaperLib;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -36,6 +39,18 @@ import xyz.jpenilla.minimotd.common.PingResponse;
import xyz.jpenilla.minimotd.common.config.MOTDConfig;
public final class PaperPingListener implements Listener {
private static final Method WORK_AROUND_PAPER_BUG;
static {
Method paperWorkaround;
try {
paperWorkaround = PaperServerListPingEvent.class.getMethod("getListedPlayers");
} catch (final NoSuchMethodException e) {
paperWorkaround = null;
}
WORK_AROUND_PAPER_BUG = paperWorkaround;
}
private final LegacyComponentSerializer unusualHexSerializer = LegacyComponentSerializer.builder().hexColors().useUnusualXRepeatedCharacterHexFormat().build();
private final MiniMOTD<CachedServerIcon> miniMOTD;
@@ -60,7 +75,17 @@ public final class PaperPingListener implements Listener {
response.icon(event::setServerIcon);
if (response.disablePlayerListHover()) {
event.getPlayerSample().clear();
if (WORK_AROUND_PAPER_BUG != null) {
// Newer Paper replaces getPlayerSample with getListedPlayers,
// the old method is supposed to still work, but it just silently does nothing on 1.20.6 (fixed in 1.21.1)
try {
((List) WORK_AROUND_PAPER_BUG.invoke(event)).clear();
} catch (final IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException("Failed to invoke " + WORK_AROUND_PAPER_BUG.getName(), e);
}
} else {
event.getPlayerSample().clear();
}
}
if (response.hidePlayerCount()) {
event.setHidePlayers(true);
+1 -1
View File
@@ -18,7 +18,7 @@ tasks {
commonRelocation("org.bstats")
}
runWaterfall {
waterfallVersion("1.20")
waterfallVersion("1.21")
}
processResources {
val props = mapOf(
@@ -34,7 +34,7 @@ import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
import net.fabricmc.loader.api.FabricLoader;
import net.kyori.adventure.platform.fabric.FabricServerAudiences;
import net.kyori.adventure.platform.modcommon.MinecraftServerAudiences;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.network.protocol.status.ServerStatus;
import net.minecraft.server.MinecraftServer;
@@ -57,7 +57,7 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<Se
private final MiniMOTD<ServerStatus.Favicon> miniMOTD = new MiniMOTD<>(this);
private MinecraftServer server;
private FabricServerAudiences audiences;
private MinecraftServerAudiences audiences;
public MiniMOTDFabric() {
if (instance != null) {
@@ -75,7 +75,7 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<Se
this.registerCommand();
ServerLifecycleEvents.SERVER_STARTING.register(minecraftServer -> {
this.server = minecraftServer;
this.audiences = FabricServerAudiences.of(minecraftServer);
this.audiences = MinecraftServerAudiences.of(minecraftServer);
});
ServerLifecycleEvents.SERVER_STARTED.register(minecraftServer -> {
if (this.miniMOTD.configManager().pluginSettings().updateChecker()) {
@@ -114,7 +114,7 @@ public final class MiniMOTDFabric implements ModInitializer, MiniMOTDPlatform<Se
));
}
public @NonNull FabricServerAudiences audiences() {
public @NonNull MinecraftServerAudiences audiences() {
return this.audiences;
}
@@ -69,9 +69,9 @@ abstract class ServerStatusPacketListenerImplMixin {
final MutableServerStatus modifiedStatus = new MutableServerStatus(vanillaStatus);
response.motd(motd -> {
if (((ConnectionAccess) this.connection).protocolVersion() >= Constants.MINECRAFT_1_16_PROTOCOL_VERSION) {
modifiedStatus.description(miniMOTDFabric.audiences().toNative(motd));
modifiedStatus.description(miniMOTDFabric.audiences().asNative(motd));
} else {
modifiedStatus.description(miniMOTDFabric.audiences().toNative(ComponentColorDownsampler.downsampler().downsample(motd)));
modifiedStatus.description(miniMOTDFabric.audiences().asNative(ComponentColorDownsampler.downsampler().downsample(motd)));
}
});
response.icon(favicon -> modifiedStatus.favicon(Optional.of(favicon)));
@@ -23,8 +23,8 @@
"minimotd-fabric.mixins.json"
],
"depends": {
"fabricloader": ">=0.15.11",
"fabricloader": ">=0.16.7",
"fabric": "*",
"minecraft": ">=1.21 <=1.21.1"
"minecraft": "1.21.3"
}
}
@@ -23,7 +23,7 @@ side = "BOTH"
[[dependencies.minimotd]]
modId = "minecraft"
type = "required"
versionRange = "[1.21,1.21.2)"
versionRange = "[1.21.3]"
ordering = "NONE"
side = "BOTH"
+1 -1
View File
@@ -54,6 +54,6 @@ publishMods.modrinth {
"1.18.2",
"1.19.4",
"1.20.6",
"1.21.1",
"1.21.3",
)
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB