geforkt von Mirrors/Paper
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>
Dieser Commit ist enthalten in:
Ursprung
d0a2aeaa99
Commit
5c113e7369
@ -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);
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren