mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
SPIGOT-4586: Change PotionEffectType#value to not include null
As the PotionEffectType class is containing a bunch of constant values the values method now fits the general idea of the Enum#values method as it no longer returns a null object at index 0 By: Bjarne Koll <LynxPlay101@gmail.com>
This commit is contained in:
parent
d0a2aeaa99
commit
5c113e7369
1 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.bukkit.potion;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -303,11 +304,11 @@ public abstract class PotionEffectType {
|
|||
|
||||
/**
|
||||
* Returns an array of all the registered {@link PotionEffectType}s.
|
||||
* This array is not necessarily in any particular order and may contain null.
|
||||
* This array is not necessarily in any particular order.
|
||||
*
|
||||
* @return Array of types.
|
||||
*/
|
||||
public static PotionEffectType[] values() {
|
||||
return byId.clone();
|
||||
return Arrays.copyOfRange(byId, 1, byId.length);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue