mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 03:25:19 +01:00
Fix sending component messages on older CB/S releases (#1344)
This commit is contained in:
parent
e5c4b710f6
commit
8eed3131f2
@ -13,7 +13,7 @@ dependencies {
|
|||||||
compile project(':common')
|
compile project(':common')
|
||||||
|
|
||||||
compileOnly 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT'
|
compileOnly 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT'
|
||||||
compileOnly'net.kyori:text-adapter-bukkit:1.0.0'
|
compileOnly'net.kyori:text-adapter-bukkit:1.0.1'
|
||||||
compileOnly 'me.lucko:commodore:1.0'
|
compileOnly 'me.lucko:commodore:1.0'
|
||||||
compileOnly('net.milkbowl.vault:VaultAPI:1.6') {
|
compileOnly('net.milkbowl.vault:VaultAPI:1.6') {
|
||||||
exclude(module: 'bukkit')
|
exclude(module: 'bukkit')
|
||||||
|
@ -6,6 +6,7 @@ dependencies {
|
|||||||
compile project(':common')
|
compile project(':common')
|
||||||
|
|
||||||
compileOnly 'net.md-5:bungeecord-api:1.12-SNAPSHOT'
|
compileOnly 'net.md-5:bungeecord-api:1.12-SNAPSHOT'
|
||||||
|
compileOnly 'net.kyori:text-adapter-bungeecord:1.0.1'
|
||||||
compileOnly 'com.imaginarycode.minecraft:RedisBungee:0.4'
|
compileOnly 'com.imaginarycode.minecraft:RedisBungee:0.4'
|
||||||
|
|
||||||
// migration plugins
|
// migration plugins
|
||||||
|
@ -33,10 +33,9 @@ import me.lucko.luckperms.common.sender.SenderFactory;
|
|||||||
import me.lucko.luckperms.common.util.TextUtils;
|
import me.lucko.luckperms.common.util.TextUtils;
|
||||||
|
|
||||||
import net.kyori.text.Component;
|
import net.kyori.text.Component;
|
||||||
import net.kyori.text.serializer.ComponentSerializers;
|
import net.kyori.text.adapter.bungeecord.TextAdapter;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.chat.ComponentSerializer;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@ -68,7 +67,7 @@ public class BungeeSenderFactory extends SenderFactory<CommandSender> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void sendMessage(CommandSender sender, Component message) {
|
protected void sendMessage(CommandSender sender, Component message) {
|
||||||
sender.sendMessage(ComponentSerializer.parse(ComponentSerializers.JSON.serialize(message)));
|
TextAdapter.sendComponent(sender, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -94,7 +94,7 @@ public class LPBungeePlugin extends AbstractLuckPermsPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<Dependency> getGlobalDependencies() {
|
protected Set<Dependency> getGlobalDependencies() {
|
||||||
return EnumSet.of(Dependency.TEXT, Dependency.CAFFEINE, Dependency.OKIO, Dependency.OKHTTP, Dependency.EVENT);
|
return EnumSet.of(Dependency.TEXT, Dependency.TEXT_ADAPTER_BUNGEECORD, Dependency.CAFFEINE, Dependency.OKIO, Dependency.OKHTTP, Dependency.EVENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -69,8 +69,15 @@ public enum Dependency {
|
|||||||
TEXT_ADAPTER_BUKKIT(
|
TEXT_ADAPTER_BUKKIT(
|
||||||
"net{}kyori",
|
"net{}kyori",
|
||||||
"text-adapter-bukkit",
|
"text-adapter-bukkit",
|
||||||
"1.0.0",
|
"1.0.1",
|
||||||
"2Ph9vLzuofbE4iMaTMOTaR+v0M1Dxn503ia9rwfn7x8=",
|
"WZp7wCp2+EJC+Q/hxGLh/FJJCrn5Zdi2A1z2hX67jAM=",
|
||||||
|
Relocation.of("text", "net{}kyori{}text")
|
||||||
|
),
|
||||||
|
TEXT_ADAPTER_BUNGEECORD(
|
||||||
|
"net{}kyori",
|
||||||
|
"text-adapter-bungeecord",
|
||||||
|
"1.0.1",
|
||||||
|
"A5JCRyp8Y/TIuQEtdOslo28am36DQHsgeK6FLa8aJCU=",
|
||||||
Relocation.of("text", "net{}kyori{}text")
|
Relocation.of("text", "net{}kyori{}text")
|
||||||
),
|
),
|
||||||
EVENT(
|
EVENT(
|
||||||
|
Loading…
Reference in New Issue
Block a user