mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
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
This commit is contained in:
parent
f72497532f
commit
bd9794e744
@ -1,5 +1,6 @@
|
|||||||
package com.gmail.nossr50.events.skills;
|
package com.gmail.nossr50.events.skills;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event;
|
import org.bukkit.event.Event;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
@ -16,7 +17,7 @@ public class SkillActivationPerkEvent extends Event {
|
|||||||
private final int maxTicks;
|
private final int maxTicks;
|
||||||
|
|
||||||
public SkillActivationPerkEvent(Player player, int ticks, int maxTicks) {
|
public SkillActivationPerkEvent(Player player, int ticks, int maxTicks) {
|
||||||
|
super(!Bukkit.isPrimaryThread());
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.ticks = ticks;
|
this.ticks = ticks;
|
||||||
this.maxTicks = maxTicks;
|
this.maxTicks = maxTicks;
|
||||||
|
Loading…
Reference in New Issue
Block a user