[FEAT/BUG] Adventure parser backport and added Compat API for Advanced Chat
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- a/Fabric/build.gradle
|
||||
+++ b/Fabric/build.gradle
|
||||
@@ -9,9 +9,6 @@
|
||||
@@ -9,13 +9,9 @@
|
||||
exclude(group: "net.fabricmc.fabric-api")
|
||||
}
|
||||
|
||||
@@ -10,7 +10,11 @@
|
||||
modImplementation("me.shedaniel.cloth:cloth-config-fabric:${cloth_config}")
|
||||
modImplementation "maven.modrinth:fabrictailor:${fabrictailor}"
|
||||
modImplementation "maven.modrinth:vanish:${vanish}"
|
||||
@@ -117,8 +114,8 @@
|
||||
- modImplementation("unimaven.modrinth:advanced-chat:${advanced_chat}")
|
||||
|
||||
// Do not edit or remove
|
||||
implementation project(":Common")
|
||||
@@ -118,8 +114,8 @@
|
||||
setVersionType("release")
|
||||
setChangelog(rootProject.file("changelog.md"))
|
||||
setProjectVersion("${minecraft_version}-${project.version}")
|
||||
|
@@ -0,0 +1,25 @@
|
||||
--- a/Fabric/src/main/java/com/hypherionmc/craterlib/common/FabricCompatHelper.java
|
||||
+++ b/Fabric/src/main/java/com/hypherionmc/craterlib/common/FabricCompatHelper.java
|
||||
@@ -5,7 +5,6 @@
|
||||
import com.hypherionmc.craterlib.core.platform.CompatUtils;
|
||||
import com.hypherionmc.craterlib.core.platform.ModloaderEnvironment;
|
||||
import com.hypherionmc.craterlib.nojang.world.entity.player.BridgedPlayer;
|
||||
-import me.wesley1808.advancedchat.api.AdvancedChatAPI;
|
||||
import net.kyori.adventure.text.Component;
|
||||
|
||||
public class FabricCompatHelper implements CompatUtils {
|
||||
@@ -40,12 +39,11 @@
|
||||
|
||||
@Override
|
||||
public boolean isPrivateMessage(BridgedPlayer player) {
|
||||
- return !AdvancedChatAPI.isPublicChat(player.toMojangServerPlayer());
|
||||
+ return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getChannelPrefix(BridgedPlayer player) {
|
||||
- net.minecraft.network.chat.Component c = AdvancedChatAPI.getChannelPrefix(player.toMojangServerPlayer());
|
||||
- return c.getString().isBlank() ? Component.empty() : Component.text(c.getString());
|
||||
+ return Component.empty();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user