Skip to content

Commit

Permalink
Fix suspension happening all the time
Browse files Browse the repository at this point in the history
  • Loading branch information
Dueris committed May 26, 2024
1 parent d5ea1f2 commit 1cf5f06
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ public void onChoose(Player player, Layer layer) {
org.bukkit.entity.Player bukkitEntity = (org.bukkit.entity.Player) player.getBukkitEntity();

if (PlayerManager.firstJoin.contains(bukkitEntity)) {
ModifyPlayerSpawnPower.suspendPlayer(bukkitEntity);
new BukkitRunnable() {
@Override
public void run() {
if (PowerHolderComponent.hasPowerType(bukkitEntity, ModifyPlayerSpawnPower.class)) {
ModifyPlayerSpawnPower.suspendPlayer(bukkitEntity);
}
for (ModifyPlayerSpawnPower power : PowerHolderComponent.getPowers(bukkitEntity, ModifyPlayerSpawnPower.class)) {
power.runD(new PlayerPostRespawnEvent(bukkitEntity, bukkitEntity.getLocation(), false));
}
Expand Down

0 comments on commit 1cf5f06

Please sign in to comment.