change transformable entity list into immutable set

This commit is contained in:
nossr50 2024-09-28 13:42:25 -07:00
parent d7e8a6b7c1
commit 8087d5f647
2 changed files with 4 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.2.022</version>
<version>2.2.023-SNAPSHOT</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

View File

@ -47,6 +47,7 @@ import org.bukkit.projectiles.ProjectileSource;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import static com.gmail.nossr50.util.MobMetadataUtils.*;
@ -58,7 +59,8 @@ public class EntityListener implements Listener {
* check if a {@link Player} has a {@link Trident} enchanted with "Piercing".
*/
private final NamespacedKey piercingEnchantment = NamespacedKey.minecraft("piercing");
private final static List<EntityType> TRANSFORMABLE_ENTITIES = Arrays.asList(EntityType.SLIME, EntityType.MAGMA_CUBE);
private final static Set<EntityType> TRANSFORMABLE_ENTITIES
= Set.of(EntityType.SLIME, EntityType.MAGMA_CUBE);
public EntityListener(final mcMMO pluginRef) {
this.pluginRef = pluginRef;