9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 12:29:16 +00:00

clean: worldguard listener moved to isEmpty from == 0

This commit is contained in:
LoJoSho
2023-08-06 10:01:36 -05:00
parent c0caea2447
commit 8e8d86b94c

View File

@@ -31,7 +31,7 @@ public class WGListener implements Listener {
Location location = event.getPlayer().getLocation();
ApplicableRegionSet set = getRegions(location);
if (user.getHidden()) {
if (user.getHiddenReason() == CosmeticUser.HiddenReason.WORLDGUARD && set.getRegions().size() == 0) {
if (user.getHiddenReason() == CosmeticUser.HiddenReason.WORLDGUARD && set.getRegions().isEmpty()) {
user.showCosmetics();
}
}
@@ -59,7 +59,7 @@ public class WGListener implements Listener {
Location location = event.getTo();
ApplicableRegionSet set = getRegions(location);
if (user.getHidden()) {
if (user.getHiddenReason() == CosmeticUser.HiddenReason.WORLDGUARD && set.getRegions().size() == 0) {
if (user.getHiddenReason() == CosmeticUser.HiddenReason.WORLDGUARD && set.getRegions().isEmpty()) {
user.showCosmetics();
}
}