From 2a933f5582f459717164a9529f59ec5219060a18 Mon Sep 17 00:00:00 2001 From: Electroblob <35599699+Electroblob77@users.noreply.github.com> Date: Tue, 6 Feb 2018 16:35:10 +0000 Subject: [PATCH] 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. --- src/main/java/electroblob/wizardry/WizardData.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/electroblob/wizardry/WizardData.java b/src/main/java/electroblob/wizardry/WizardData.java index b0110951..c8cc4aca 100644 --- a/src/main/java/electroblob/wizardry/WizardData.java +++ b/src/main/java/electroblob/wizardry/WizardData.java @@ -217,6 +217,7 @@ public class WizardData implements INBTSerializable { } /** 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){ // 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.