diff --git a/src/com/massivecraft/massivecore/command/type/TypeAbstract.java b/src/com/massivecraft/massivecore/command/type/TypeAbstract.java index 1beb5f51..fdf3dae9 100644 --- a/src/com/massivecraft/massivecore/command/type/TypeAbstract.java +++ b/src/com/massivecraft/massivecore/command/type/TypeAbstract.java @@ -15,7 +15,6 @@ import org.bukkit.command.CommandSender; import com.massivecraft.massivecore.MassiveException; import com.massivecraft.massivecore.Named; import com.massivecraft.massivecore.collections.MassiveList; -import com.massivecraft.massivecore.collections.MassiveSet; import com.massivecraft.massivecore.command.editor.CommandEditAbstract; import com.massivecraft.massivecore.command.editor.CommandEditSimple; import com.massivecraft.massivecore.command.editor.EditSettings; @@ -122,7 +121,7 @@ public abstract class TypeAbstract implements Type public Set getVisualsInner(T value, CommandSender sender) { - return new MassiveSet(this.getVisualInner(value, sender)); + return Collections.singleton(this.getVisualInner(value, sender)); } public Set getVisualsInner(T value) { @@ -131,7 +130,7 @@ public abstract class TypeAbstract implements Type public Set getVisuals(T value, CommandSender sender) { - if (value == null) return new MassiveSet(NULL); + if (value == null) return Collections.singleton(NULL); return this.getVisualsInner(value, sender); } public Set getVisuals(T value) @@ -162,12 +161,12 @@ public abstract class TypeAbstract implements Type public Set getNamesInner(T value) { - return new MassiveSet(this.getNameInner(value)); + return Collections.singleton(this.getNameInner(value)); } public Set getNames(T value) { - if (value == null) return new MassiveSet(); + if (value == null) return Collections.emptySet(); return this.getNamesInner(value); } @@ -198,12 +197,12 @@ public abstract class TypeAbstract implements Type public Set getIdsInner(T value) { - return new MassiveSet(this.getIdInner(value)); + return Collections.singleton(this.getIdInner(value)); } public Set getIds(T value) { - if (value == null) return new MassiveSet(); + if (value == null) return Collections.emptySet(); return this.getIdsInner(value); } diff --git a/src/com/massivecraft/massivecore/command/type/enumeration/TypeEntityType.java b/src/com/massivecraft/massivecore/command/type/enumeration/TypeEntityType.java index 6ea7c966..82b07d7a 100644 --- a/src/com/massivecraft/massivecore/command/type/enumeration/TypeEntityType.java +++ b/src/com/massivecraft/massivecore/command/type/enumeration/TypeEntityType.java @@ -4,6 +4,8 @@ import java.util.Set; import org.bukkit.entity.EntityType; +import com.massivecraft.massivecore.collections.MassiveSet; + public class TypeEntityType extends TypeEnum { // -------------------------------------------- // @@ -24,7 +26,7 @@ public class TypeEntityType extends TypeEnum @Override public Set getNamesInner(EntityType value) { - Set ret = super.getNamesInner(value); + Set ret = new MassiveSet(super.getNamesInner(value)); if (value == EntityType.PIG_ZOMBIE) { diff --git a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWorldType.java b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWorldType.java index 37bb2366..ad4e1e20 100644 --- a/src/com/massivecraft/massivecore/command/type/enumeration/TypeWorldType.java +++ b/src/com/massivecraft/massivecore/command/type/enumeration/TypeWorldType.java @@ -4,6 +4,8 @@ import java.util.Set; import org.bukkit.WorldType; +import com.massivecraft.massivecore.collections.MassiveSet; + public class TypeWorldType extends TypeEnum { // -------------------------------------------- // @@ -24,7 +26,7 @@ public class TypeWorldType extends TypeEnum @Override public Set getNamesInner(WorldType value) { - Set ret = super.getNamesInner(value); + Set ret = new MassiveSet(super.getNamesInner(value)); if (value == WorldType.NORMAL) {