From bd9794e744e2f4182c83b7aa0e26921f136337f4 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 21 Jan 2021 12:09:24 +0000 Subject: [PATCH] Support calling SkillActivationPerkEvent off the main thread This event was never considered as to if it would be called off the main thread, this event should NOT be designed to signify that a skill activation is occuring, just providing a means to manipulate those values by other plugins, etc --- .../gmail/nossr50/events/skills/SkillActivationPerkEvent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/events/skills/SkillActivationPerkEvent.java b/src/main/java/com/gmail/nossr50/events/skills/SkillActivationPerkEvent.java index 89c41dd6f..36848e6fa 100644 --- a/src/main/java/com/gmail/nossr50/events/skills/SkillActivationPerkEvent.java +++ b/src/main/java/com/gmail/nossr50/events/skills/SkillActivationPerkEvent.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.events.skills; +import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; @@ -16,7 +17,7 @@ public class SkillActivationPerkEvent extends Event { private final int maxTicks; public SkillActivationPerkEvent(Player player, int ticks, int maxTicks) { - + super(!Bukkit.isPrimaryThread()); this.player = player; this.ticks = ticks; this.maxTicks = maxTicks;