@ -307,6 +307,11 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync {
return audiences;
}
@Override
public Set<UUID> getLockedPlayers() {
return this.eventListener.getLockedPlayers();
public CompletableFuture<Boolean> reload() {
return CompletableFuture.supplyAsync(() -> {
@ -675,4 +675,9 @@ public class BukkitPlayer extends OnlineUser {
return maxHealth;
public boolean isLocked() {
return BukkitHuskSync.getInstance().getLockedPlayers().contains(player.getUniqueId());
@ -165,4 +165,6 @@ public interface HuskSync {
*/
CompletableFuture<Boolean> reload();
Set<UUID> getLockedPlayers();
@ -236,4 +236,8 @@ public abstract class EventListener {
plugin.getRedisManager().close();
public final Set<UUID> getLockedPlayers() {
return this.lockedPlayers;
@ -371,4 +371,10 @@ public abstract class OnlineUser extends User {
});
/**
* Get if the player is locked
*
* @return the player's locked status
public abstract boolean isLocked();
@ -166,4 +166,9 @@ public class DummyPlayer extends OnlineUser {
return false;