diff --git a/src/main/java/electroblob/wizardry/spell/Spell.java b/src/main/java/electroblob/wizardry/spell/Spell.java index c4e6d90f..f15e49dd 100644 --- a/src/main/java/electroblob/wizardry/spell/Spell.java +++ b/src/main/java/electroblob/wizardry/spell/Spell.java @@ -1,5 +1,6 @@ package electroblob.wizardry.spell; +import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -403,12 +404,11 @@ public abstract class Spell extends IForgeRegistryEntry.Impl implements C } /** Returns a list of all registered spells' registry names, excluding the 'none' spell. Used in commands. */ - public static String[] getSpellNames(){ + public static Collection getSpellNames(){ // Maybe it would be better to store all of this statically? Set keys = new HashSet(registry.getKeys()); keys.remove(registry.getKey(Spells.none)); - // Streams! - return keys.stream().map(ResourceLocation::toString).toArray(String[]::new); + return keys; } /**