mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 06:28:49 +00:00
refactor: Use native platform adventure implementations
This commit is contained in:
12 files changed
+66
-29
No files matched your search
@@ -37,7 +37,6 @@ shadowJar {
|
||||
relocate 'dev.dejvokep.boostedyaml', 'net.william278.huskhomes.libraries.boostedyaml'
|
||||
relocate 'org.yaml.snakeyaml', 'net.william278.huskhomes.libraries.snakeyaml'
|
||||
relocate 'com.google.gson', 'net.william278.huskhomes.libraries.gson'
|
||||
relocate 'net.kyori', 'net.william278.huskhomes.libraries'
|
||||
relocate 'org.bstats', 'net.william278.huskhomes.libraries.bstats'
|
||||
relocate 'io.papermc.lib', 'net.william278.huskhomes.libraries.paperlib'
|
||||
relocate 'space.arim.morepaperlib', 'net.william278.huskhomes.libraries.paperlib'
|
||||
|
||||
@@ -19,9 +19,13 @@
|
||||
|
||||
package net.william278.huskhomes;
|
||||
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.william278.huskhomes.listener.PaperEventListener;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class PaperHuskHomes extends BukkitHuskHomes {
|
||||
|
||||
@Override
|
||||
@@ -30,4 +34,10 @@ public class PaperHuskHomes extends BukkitHuskHomes {
|
||||
return new PaperEventListener(this);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Audience getAudience(@NotNull UUID user) {
|
||||
final Player player = getServer().getPlayer(user);
|
||||
return player == null || !player.isOnline() ? Audience.empty() : player;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user