feat: add tp invulerability option, show privacy in /homelist (#577)

* Renamed PrivateHomeListCommand.java to HomeListCommand.java as it shows all homes not just private homes

* Implemented https://github.com/WiIIiam278/HuskHomes/issues/543

* Implemented https://github.com/WiIIiam278/HuskHomes/issues/515

* added changes to all lang files, removed un used imports, fix error where it would not remove invulnerability from player on sponge
This commit is contained in:
Preva1l authored and GitHub committed 2024-02-25 16:47:16 +00:00
1 parent 2f2ae6f0d2
commit 1cb56f93fb
27 files changed
+108 -21

No files matched your search

@@ -131,4 +131,18 @@ public class SpongeUser extends OnlineUser {
return false;
}
/**
* Handles player invulnerability after teleporting
*/
@Override
public void handleInvulnerability() {
if (plugin.getSettings().getGeneral().getTeleportInvulnerabilityTime() <= 0) {
return;
}
long invulnerabilityTimeInTicks = 20L * plugin.getSettings().getGeneral().getTeleportInvulnerabilityTime();
player.invulnerable().set(false);
// Remove the invulnerability
plugin.runSyncDelayed(() -> player.invulnerable().set(true), invulnerabilityTimeInTicks);
}
}