All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.command.builder.arguments.minecraft.registry.ArgumentParticle Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.command.builder.arguments.minecraft.registry;

import net.minestom.server.particle.Particle;
import org.jetbrains.annotations.NotNull;

/**
 * Represents an argument giving a {@link Particle}.
 */
public class ArgumentParticle extends ArgumentRegistry {

    public ArgumentParticle(String id) {
        super(id);
    }

    @Override
    public String parser() {
        return "minecraft:particle";
    }

    @Override
    public Particle getRegistry(@NotNull String value) {
        return Particle.fromNamespaceId(value);
    }

    @Override
    public String toString() {
        return String.format("Particle<%s>", getId());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy