mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
fix: Teleport Invulnerability oversight & incorrect values on Sponge (#671)
This commit is contained in:
1 parent
0eeab972e4
commit
afae073ab7
9 files changed
+41
-2
No files matched your search
@@ -147,9 +147,15 @@ public class SpongeUser extends OnlineUser {
|
||||
return;
|
||||
}
|
||||
long invulnerabilityTimeInTicks = 20L * plugin.getSettings().getGeneral().getTeleportInvulnerabilityTime();
|
||||
player.invulnerable().set(false);
|
||||
player.invulnerable().set(true);
|
||||
// Remove the invulnerability
|
||||
plugin.runSyncDelayed(() -> player.invulnerable().set(true), this, invulnerabilityTimeInTicks);
|
||||
plugin.runSyncDelayed(() -> player.invulnerable().set(false), this, invulnerabilityTimeInTicks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeInvulnerabilityIfPermitted() {
|
||||
if (plugin.isInvulnerable(this.getUuid())) {
|
||||
player.invulnerable().set(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user