From 987e1d98d791cdf24df82c3bd0f8cebe49c94619 Mon Sep 17 00:00:00 2001 From: Brianna Date: Mon, 5 Aug 2019 00:27:04 -0400 Subject: [PATCH] Fixed applying enchants. --- .../java/com/songoda/epicenchants/objects/Enchant.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/songoda/epicenchants/objects/Enchant.java b/src/main/java/com/songoda/epicenchants/objects/Enchant.java index 328d1f7..d15aeb3 100644 --- a/src/main/java/com/songoda/epicenchants/objects/Enchant.java +++ b/src/main/java/com/songoda/epicenchants/objects/Enchant.java @@ -1,9 +1,11 @@ package com.songoda.epicenchants.objects; +import com.songoda.epicenchants.EpicEnchants; import com.songoda.epicenchants.effect.EffectExecutor; import com.songoda.epicenchants.enums.EventType; import com.songoda.epicenchants.enums.TriggerType; import com.songoda.epicenchants.utils.single.RomanNumber; +import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; @@ -11,6 +13,7 @@ import org.bukkit.event.Event; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -21,7 +24,6 @@ public class Enchant { private Group group; private int maxLevel; private Set conflict; - //TODO: ISSUES private Set itemWhitelist; private Set effectExecutors; private List description; @@ -80,11 +82,11 @@ public class Enchant { } public Set getItemWhitelist() { - return this.itemWhitelist; + return new HashSet<>(this.itemWhitelist); } public Set getEffectExecutors() { - return this.effectExecutors; + return new HashSet<>(this.effectExecutors); } public List getDescription() {