Skip to content

Commit

Permalink
fix(radiation): 让玩家在进入是获得辐射免疫 (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
JWJUN233233 authored Jul 4, 2024
1 parent 226af9b commit 7f9f9b2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerJoinEvent;

/**
* {@link RadioactivityListener} handles radioactivity level resets
Expand All @@ -25,4 +26,10 @@ public void onPlayerDeath(@Nonnull PlayerDeathEvent e) {
RadiationUtils.clearExposure(e.getEntity());
RadiationTask.addGracePeriod(e.getEntity());
}

@EventHandler
public void onPlayerJoin(@Nonnull PlayerJoinEvent e) {
RadiationUtils.clearExposure(e.getPlayer());
RadiationTask.addGracePeriod(e.getPlayer());
}
}

0 comments on commit 7f9f9b2

Please sign in to comment.