src/main/java/de/viper/survivalplus/Manager/BlockManager.java aktualisiert
This commit is contained in:
@@ -13,14 +13,14 @@ public class BlockManager {
|
||||
}
|
||||
|
||||
public void unblockPlayer(Player blocker, Player toUnblock) {
|
||||
Set<UUID> blocked = blockedPlayers.get(blocker.getUniqueId());
|
||||
if (blocked != null) {
|
||||
blocked.remove(toUnblock.getUniqueId());
|
||||
if (blocked.isEmpty()) {
|
||||
blockedPlayers.remove(blocker.getUniqueId());
|
||||
}
|
||||
Set<UUID> blocked = blockedPlayers.get(blocker.getUniqueId());
|
||||
if (blocked != null) {
|
||||
blocked.remove(toUnblock.getUniqueId());
|
||||
if (blocked.isEmpty()) {
|
||||
blockedPlayers.remove(blocker.getUniqueId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasBlocked(Player blocker, Player potentialBlocked) {
|
||||
return blockedPlayers.getOrDefault(blocker.getUniqueId(), Collections.emptySet())
|
||||
|
Reference in New Issue
Block a user