Update WizardData.java
The compiler has now decided to generate a warning here for some reason. Suppressed the warning because having it this way avoids casting when the method is used.
This commit is contained in:
@@ -217,6 +217,7 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the imbuement duration associated with the given imbuement for this player, or 0 if it does not exist. */
|
/** Returns the imbuement duration associated with the given imbuement for this player, or 0 if it does not exist. */
|
||||||
|
@SuppressWarnings("unlikely-arg-type")
|
||||||
public int getImbuementDuration(Enchantment enchantment){
|
public int getImbuementDuration(Enchantment enchantment){
|
||||||
// Need to check that i is not null, otherwise it throws an NPE when Java auto-unboxes it.
|
// Need to check that i is not null, otherwise it throws an NPE when Java auto-unboxes it.
|
||||||
// What's nice here is that the map simply accepts objects as keys, so there's no need to cast or throw exceptions.
|
// What's nice here is that the map simply accepts objects as keys, so there's no need to cast or throw exceptions.
|
||||||
|
|||||||
Reference in New Issue
Block a user