public class ParticleRegistry
extends java.lang.Object
A registry representing all particle name changes between various Spigot versions.
It consist of list containing a maps of ParticleNode nodes
for each significant Spigot version change.
This approach allows for fast access to ParticleNode nodes of
current particle name in running Spigot version using ParticleVersion enum
as index in the list. Next, it uses particle name as a key for returned map that
returns ParticleNode associated with current particle.
This node is then used to find certain's particle in desired Spigot version.
This registry only exists during class generation and will be
garbage collected after implementations of interface instantiation
in ParticleNativeAPI instance finishes.
| Constructor and Description |
|---|
ParticleRegistry() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
find(ParticleVersion from,
java.lang.String name,
ParticleVersion to)
Attempts to convert particle name from provided Spigot version
to target Spigot version.
|
public java.lang.String find(ParticleVersion from, java.lang.String name, ParticleVersion to)
Attempts to convert particle name from provided Spigot version to target Spigot version.
from - a ParticleVersion enum representing Spigot
version of parameter particle name.name - a particle name in parameter from Spigot version.to - a ParticleVersion enum representing Spigot version
to which attempt of conversion should happen.Copyright © 2020. All Rights Reserved.