Move ViaVersion to Proxy

This commit is contained in:
Lixfel
2024-12-24 14:55:27 +01:00
parent bd87221198
commit 22a8ca4aea
23 changed files with 104 additions and 190 deletions
-2
View File
@@ -26,6 +26,4 @@ dependencies {
compileOnly(project(":SpigotCore:SpigotCore_8", "default"))
compileOnly(libs.nms9)
compileOnly(libs.viaapi)
}
@@ -20,10 +20,8 @@
package de.steamwar.core;
import com.comphenix.tinyprotocol.Reflection;
import com.viaversion.viaversion.api.Via;
import net.md_5.bungee.api.ChatMessageType;
import net.md_5.bungee.api.chat.BaseComponent;
import net.minecraft.server.v1_9_R2.PacketPlayOutEntity;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
@@ -38,7 +36,7 @@ public class BountifulWrapper9 implements BountifulWrapper.IBountifulWrapper {
@Override
public void sendMessage(Player player, ChatMessageType type, BaseComponent... msg) {
if(type == ChatMessageType.CHAT && Via.getAPI().getPlayerVersion(player.getUniqueId()) >= 759)
if(type == ChatMessageType.CHAT)
type = ChatMessageType.SYSTEM;
player.spigot().sendMessage(type, msg);