1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Update TalismanListener.java

This commit is contained in:
TheBusyBiscuit 2020-10-30 23:10:07 +01:00 committed by GitHub
parent 3471932050
commit 17e0d0ef1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,9 +320,8 @@ public class TalismanListener implements Listener {
ItemStack talisman = Talisman.tryActivateAndGet(e, SlimefunItems.TALISMAN_RESURRECTED); ItemStack talisman = Talisman.tryActivateAndGet(e, SlimefunItems.TALISMAN_RESURRECTED);
if (dmgCause == DamageCause.VOID && talisman != null) { if (dmgCause == DamageCause.VOID && talisman != null) {
SlimefunPlugin.runSync(() -> { // This event is cancelled by the Talisman, so they don't actually die, we just teleport them after 2 ticks.
PaperLib.teleportAsync(player, getSafeRespawnLocation(talisman, player)); SlimefunPlugin.runSync(() -> PaperLib.teleportAsync(player, getSafeRespawnLocation(talisman, player)), 2);
}, 2);
} }
} }