mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 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
@@ -27,6 +27,7 @@ import net.kyori.adventure.key.Key;
|
||||
import net.kyori.adventure.sound.Sound;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.title.Title;
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.config.Locales;
|
||||
import net.william278.huskhomes.position.Location;
|
||||
import net.william278.huskhomes.position.Position;
|
||||
@@ -42,8 +43,11 @@ import java.util.*;
|
||||
*/
|
||||
public abstract class OnlineUser extends User implements Teleportable, CommandUser {
|
||||
|
||||
public OnlineUser(@NotNull UUID uuid, @NotNull String username) {
|
||||
protected final HuskHomes plugin;
|
||||
|
||||
protected OnlineUser(@NotNull UUID uuid, @NotNull String username, @NotNull HuskHomes plugin) {
|
||||
super(uuid, username);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,7 +179,9 @@ public abstract class OnlineUser extends User implements Teleportable, CommandUs
|
||||
* @return the adventure {@link Audience} for this player
|
||||
*/
|
||||
@NotNull
|
||||
public abstract Audience getAudience();
|
||||
public Audience getAudience() {
|
||||
return plugin.getAudience(getUuid());
|
||||
}
|
||||
|
||||
/**
|
||||
* Teleport a player to the specified local {@link Location}.
|
||||
|
||||
Reference in new issue
Block a user