Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #94 from Andre601/fix/81-noclassdeffoundexception-…
Browse files Browse the repository at this point in the history
…issue

Fix ProtocolLib component issue
  • Loading branch information
Andre601 authored May 8, 2023
2 parents ec9ea79 + 360b961 commit 38d6ac3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
import ch.andre601.advancedserverlist.spigot.SpigotCore;
import ch.andre601.advancedserverlist.bukkit.objects.SpigotPlayerImpl;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.AdventureComponentConverter;
import com.comphenix.protocol.wrappers.WrappedChatComponent;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
import com.comphenix.protocol.wrappers.WrappedServerPing;
import me.clip.placeholderapi.PlaceholderAPI;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;

Expand Down Expand Up @@ -77,7 +78,7 @@ public void setMaxPlayers(int maxPlayers){

@Override
public void setMotd(Component component){
ping.setMotD(AdventureComponentConverter.fromComponent(component));
ping.setMotD(WrappedChatComponent.fromJson(GsonComponentSerializer.gson().serialize(component)));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.commit/>

<plugin.version>3.0.1</plugin.version>
<plugin.version>3.0.2</plugin.version>
<plugin.description>Create multiple Server lists based on conditions.</plugin.description>

<api.version>v2.1.0</api.version>
Expand Down

0 comments on commit 38d6ac3

Please sign in to comment.