From bd11c9c759761026e0f869f16d05f171c40de1c0 Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Thu, 9 Apr 2020 21:22:43 +0100 Subject: [PATCH] Cleanup --- src/main/java/electroblob/wizardry/data/WizardData.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/electroblob/wizardry/data/WizardData.java b/src/main/java/electroblob/wizardry/data/WizardData.java index 46e7a7be..a6880a63 100644 --- a/src/main/java/electroblob/wizardry/data/WizardData.java +++ b/src/main/java/electroblob/wizardry/data/WizardData.java @@ -285,14 +285,13 @@ public class WizardData implements INBTSerializable { * @throws IllegalArgumentException if the given {@link Enchantment} is not an {@link Imbuement}. */ public void setImbuementDuration(Enchantment enchantment, int duration){ - // It is best to throw an exception here, because otherwise the error would either go unnoticed (if - // non-imbuements - // were ignored) or cause a ClassCastException later (if non-imbuements were allowed to be added). + // It is best to throw an exception here, because otherwise the error would either go unnoticed (if non- + // -imbuements were ignored) or cause a ClassCastException later (if non-imbuements were allowed to be added) if(enchantment instanceof Imbuement){ this.imbuementDurations.put((Imbuement)enchantment, duration); }else{ throw new IllegalArgumentException( - "Attempted to set an imbuement duration for something that isn't an Imbuement! (This exception has been thrown now to prevent a ClassCastException from occurring later.)"); + "Attempted to set an imbuement duration for something that isn't an Imbuement!"); } }