mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-29 19:49:13 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright © William278 2022. All rights reserved
|
||||
Copyright © William278 2023. All rights reserved
|
||||
|
||||
LICENSE
|
||||
This source code is provided as reference to licensed individuals that have purchased the HuskSync
|
||||
|
||||
@@ -307,6 +307,11 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync {
|
||||
return audiences;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<UUID> getLockedPlayers() {
|
||||
return this.eventListener.getLockedPlayers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Boolean> reload() {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
|
||||
@@ -695,4 +695,9 @@ public class BukkitPlayer extends OnlineUser {
|
||||
return maxHealth;
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLocked() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user