-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
1,723 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...main/java/com/github/fierioziy/particlenativeapi/api/particle/type/ParticleTypeColor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.github.fierioziy.particlenativeapi.api.particle.type; | ||
|
||
import com.github.fierioziy.particlenativeapi.api.utils.Shared; | ||
import org.bukkit.Color; | ||
|
||
/** | ||
* <p>Class used to represent particle type that needs a color.</p> | ||
* | ||
* <p>It provides a non-reflective <code>color</code> method overloads | ||
* to construct <code>ParticleType</code> with selected color.</p> | ||
* | ||
* <p>All <code>color</code> methods does not validate parameters in any way.</p> | ||
* | ||
* <p><b>IMPORTANT NOTE</b>: All methods annotated with {@link Shared} annotation | ||
* caches and returns exactly one and the same instance with changed state between method calls. | ||
* For an independent copy of returned instances, check <code>detachCopy</code> methods on them.</p> | ||
* | ||
* @see ParticleType | ||
*/ | ||
public interface ParticleTypeColor { | ||
|
||
/** | ||
* <p>Selects a color this particle should get.</p> | ||
* | ||
* <p>Parameters are not validated in any way.</p> | ||
* | ||
* @param color a {@link Color} object representing | ||
* desired particle color. | ||
* @return a valid shared {@link ParticleType} object with selected | ||
* color. | ||
*/ | ||
@Shared ParticleType color(Color color); | ||
|
||
/** | ||
* <p>Selects a color this particle should get.</p> | ||
* | ||
* <p>Parameters are not validated in any way.</p> | ||
* | ||
* <p><b>This method is overridden by dynamically generated | ||
* subclasses.</b></p> | ||
* | ||
* @param r red color value that should be between 0 and 255. | ||
* @param g green color value that should be between 0 and 255. | ||
* @param b blue color value that should be between 0 and 255. | ||
* @return a valid shared {@link ParticleType} object with selected | ||
* color. | ||
*/ | ||
@Shared ParticleType color(int r, int g, int b); | ||
|
||
/** | ||
* <p>Checks if this particle is supported by this Spigot version.</p> | ||
* | ||
* <p><b>This method is overridden by dynamically generated | ||
* subclasses.</b></p> | ||
* | ||
* @return true if this particle is supported by | ||
* this Spigot version, false otherwise. | ||
*/ | ||
boolean isPresent(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.