mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
refactor: store invulnerability as tag, fix #687
This commit is contained in:
6 files changed
+32
-34
No files matched your search
@@ -228,19 +228,6 @@ public interface HuskHomes extends Task.Supplier, EventDispatcher, SavePositionP
|
||||
return this.getCurrentlyOnWarmup().contains(userUuid);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
Set<UUID> getCurrentlyInvulnerable();
|
||||
|
||||
/**
|
||||
* Returns if the given user is currently invulnerable and if it should be removed.
|
||||
*
|
||||
* @param uuid the user to check.
|
||||
* @return if the user is currently invulnerable.
|
||||
*/
|
||||
default boolean isInvulnerable(@NotNull UUID uuid) {
|
||||
return this.getCurrentlyInvulnerable().contains(uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log a message to the console.
|
||||
*
|
||||
|
||||
@@ -33,6 +33,7 @@ import net.william278.huskhomes.position.Position;
|
||||
import net.william278.huskhomes.teleport.Teleportable;
|
||||
import net.william278.huskhomes.teleport.TeleportationException;
|
||||
import org.intellij.lang.annotations.Subst;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
@@ -213,13 +214,13 @@ public abstract class OnlineUser extends User implements Teleportable, CommandUs
|
||||
*/
|
||||
public abstract boolean isVanished();
|
||||
|
||||
/**
|
||||
* Handles player invulnerability after teleporting.
|
||||
*
|
||||
* @since 4.6.2
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
public abstract boolean hasInvulnerability();
|
||||
|
||||
@ApiStatus.Internal
|
||||
public abstract void handleInvulnerability();
|
||||
|
||||
@ApiStatus.Internal
|
||||
public abstract void removeInvulnerabilityIfPermitted();
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user