Skip to content

Commit

Permalink
fireworks don't spam on respawn #405
Browse files Browse the repository at this point in the history
  • Loading branch information
Caltinor committed Nov 7, 2023
1 parent d40ebb8 commit 023428a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/harmonised/pmmo/events/EventHandler.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package harmonised.pmmo.events;

import harmonised.pmmo.api.APIUtils;
import harmonised.pmmo.api.enums.EventType;
import harmonised.pmmo.api.events.EnchantEvent;
import harmonised.pmmo.api.events.FurnaceBurnEvent;
Expand All @@ -8,6 +9,7 @@
import harmonised.pmmo.events.impl.*;
import harmonised.pmmo.features.party.PartyUtils;
import harmonised.pmmo.util.Reference;
import harmonised.pmmo.util.TagBuilder;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.ai.attributes.AttributeInstance;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
Expand Down Expand Up @@ -75,8 +77,9 @@ public static void onGamemodeChange(PlayerChangeGameModeEvent event) {
}
@SubscribeEvent
public static void onRespawn(PlayerRespawnEvent event) {
Core core = Core.get(event.getEntity().level);
core.getPerkRegistry().executePerk(EventType.SKILL_UP, event.getEntity(), new CompoundTag(), core.getSide());
Core core = Core.get(event.getEntity().level);
core.getPerkRegistry().executePerk(EventType.SKILL_UP, event.getEntity(),
TagBuilder.start().withString(APIUtils.SKILLNAME, "respawn").build(), core.getSide());
}
@SubscribeEvent(priority=EventPriority.LOWEST)
public static void onSleep(SleepFinishedTimeEvent event) {
Expand Down

0 comments on commit 023428a

Please sign in to comment.