mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Fix Paper command executor on modern Paper versions (#4791)
This commit is contained in:
parent
5c46bea2ca
commit
c6fe160b47
@ -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 New Issue
Block a user