mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-12-28 11:04:21 +00:00
Fix Paper command executor on modern Paper versions (#4791)
This commit is contained in:
parent
5c46bea2ca
commit
c6fe160b47
3 changed files with 10 additions and 2 deletions
|
@ -12,7 +12,7 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
public class BukkitSenderProvider implements CommandSender {
|
||||
private final ConsoleCommandSender base;
|
||||
protected final ConsoleCommandSender base;
|
||||
private final MessageHook hook;
|
||||
|
||||
public BukkitSenderProvider(ConsoleCommandSender base, MessageHook hook) {
|
||||
|
|
|
@ -7,7 +7,9 @@ java {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':providers:BaseProviders')
|
||||
implementation(project(':providers:BaseProviders')) {
|
||||
exclude(module: 'spigot-api')
|
||||
}
|
||||
compileOnly 'io.papermc.paper:paper-api:1.18.1-R0.1-SNAPSHOT'
|
||||
compileOnly 'io.papermc.paper:paper-mojangapi:1.18.1-R0.1-SNAPSHOT'
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.kyori.adventure.text.Component;
|
|||
import net.kyori.adventure.text.ComponentLike;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PaperCommandSender extends BukkitSenderProvider {
|
||||
public PaperCommandSender(ConsoleCommandSender base, MessageHook hook) {
|
||||
|
@ -76,4 +77,9 @@ public class PaperCommandSender extends BukkitSenderProvider {
|
|||
public void sendDumbComponent(Component message) {
|
||||
sendMessage(Bukkit.getUnsafe().legacyComponentSerializer().serialize(message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Component name() {
|
||||
return base.name();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue