net.minestom.server.command.builder.arguments.minecraft.registry.ArgumentParticle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
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());
}
}