mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Fixed deprecated event
This commit is contained in:
parent
83739e9c66
commit
7da23a8acd
@ -1,5 +1,6 @@
|
||||
package net.Indyuce.mmocore.api.quest.objective;
|
||||
|
||||
import io.lumine.mythic.lib.api.event.PlayerKillEntityEvent;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -8,7 +9,6 @@ import org.bukkit.event.Listener;
|
||||
import net.Indyuce.mmocore.api.quest.ObjectiveProgress;
|
||||
import net.Indyuce.mmocore.api.quest.QuestProgress;
|
||||
import io.lumine.mythic.lib.api.MMOLineConfig;
|
||||
import io.lumine.mythic.lib.api.event.EntityKillEntityEvent;
|
||||
|
||||
public class KillMobObjective extends Objective {
|
||||
private final EntityType type;
|
||||
@ -36,9 +36,9 @@ public class KillMobObjective extends Objective {
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void a(EntityKillEntityEvent event) {
|
||||
public void a(PlayerKillEntityEvent event) {
|
||||
if(!getPlayer().isOnline()) return;
|
||||
if (event.getTarget().getType() == type && event.getEntity().equals(getPlayer().getPlayer())) {
|
||||
if (event.getTarget().getType() == type && event.getPlayer().equals(getPlayer().getPlayer())) {
|
||||
count++;
|
||||
getQuestProgress().getPlayer().getQuestData().updateBossBar();
|
||||
if (count >= required)
|
||||
|
Loading…
Reference in New Issue
Block a user