mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-09-18 21:45:12 +00:00
SPIGOT-2923: Added PotionEffectType#getColor()
This commit is contained in:
parent
703a1cf835
commit
55fa63e8b9
2 changed files with 15 additions and 0 deletions
|
@ -4,6 +4,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
import org.bukkit.Color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a type of potion and its effect on an entity.
|
* Represents a type of potion and its effect on an entity.
|
||||||
|
@ -197,6 +198,13 @@ public abstract class PotionEffectType {
|
||||||
*/
|
*/
|
||||||
public abstract boolean isInstant();
|
public abstract boolean isInstant();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the color of this effect type.
|
||||||
|
*
|
||||||
|
* @return the color
|
||||||
|
*/
|
||||||
|
public abstract Color getColor();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package org.bukkit.potion;
|
package org.bukkit.potion;
|
||||||
|
|
||||||
|
import org.bukkit.Color;
|
||||||
|
|
||||||
public class PotionEffectTypeWrapper extends PotionEffectType {
|
public class PotionEffectTypeWrapper extends PotionEffectType {
|
||||||
protected PotionEffectTypeWrapper(int id) {
|
protected PotionEffectTypeWrapper(int id) {
|
||||||
super(id);
|
super(id);
|
||||||
|
@ -28,4 +30,9 @@ public class PotionEffectTypeWrapper extends PotionEffectType {
|
||||||
public boolean isInstant() {
|
public boolean isInstant() {
|
||||||
return getType().isInstant();
|
return getType().isInstant();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Color getColor() {
|
||||||
|
return getType().getColor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue