diff --git a/src/com/massivecraft/massivecore/collections/ExceptionSet.java b/src/com/massivecraft/massivecore/collections/ExceptionSet.java index 1cd24a10..612d00c3 100644 --- a/src/com/massivecraft/massivecore/collections/ExceptionSet.java +++ b/src/com/massivecraft/massivecore/collections/ExceptionSet.java @@ -3,6 +3,8 @@ package com.massivecraft.massivecore.collections; import java.util.Arrays; import java.util.Collection; +import com.massivecraft.massivecore.command.editor.annotation.EditorType; +import com.massivecraft.massivecore.command.type.container.TypeMassiveTreeSetInsensitive; import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; public class ExceptionSet @@ -15,6 +17,7 @@ public class ExceptionSet public boolean isStandard() { return this.standard; } public void setStandard(boolean standard) { this.standard = standard; } + @EditorType(TypeMassiveTreeSetInsensitive.class) public MassiveTreeSet exceptions = new MassiveTreeSet<>(ComparatorCaseInsensitive.get()); // -------------------------------------------- // diff --git a/src/com/massivecraft/massivecore/command/type/container/TypeMassiveTreeSetInsensitive.java b/src/com/massivecraft/massivecore/command/type/container/TypeMassiveTreeSetInsensitive.java new file mode 100644 index 00000000..35601395 --- /dev/null +++ b/src/com/massivecraft/massivecore/command/type/container/TypeMassiveTreeSetInsensitive.java @@ -0,0 +1,30 @@ +package com.massivecraft.massivecore.command.type.container; + +import com.massivecraft.massivecore.collections.MassiveTreeSet; +import com.massivecraft.massivecore.command.type.primitive.TypeString; +import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; + +public class TypeMassiveTreeSetInsensitive extends TypeContainer, String> +{ + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static final TypeMassiveTreeSetInsensitive i = new TypeMassiveTreeSetInsensitive(); + public static TypeMassiveTreeSetInsensitive get() { return i; } + public TypeMassiveTreeSetInsensitive() + { + super(MassiveTreeSet.class, TypeString.get()); + } + + // -------------------------------------------- // + // OVERRIDE + // -------------------------------------------- // + + @Override + public MassiveTreeSet createNewInstance() + { + return new MassiveTreeSet<>(ComparatorCaseInsensitive.get()); + } + +}