From d30d8929820afad57d4e7e6a04c2b8db7c640509 Mon Sep 17 00:00:00 2001 From: aPunch Date: Fri, 3 Feb 2012 17:35:24 -0600 Subject: [PATCH] attempt some better trait exception handling --- lib/CitizensAPI.jar | Bin 21927 -> 23223 bytes src/net/citizensnpcs/Citizens.java | 9 ++++++--- src/net/citizensnpcs/trait/LookClose.java | 16 +++++++++------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/CitizensAPI.jar b/lib/CitizensAPI.jar index 154cf5606bbee616df478fc55701de2e320492ff..23b214b01eb8b29242477ae1f52ab5ca40b09bf5 100644 GIT binary patch delta 9418 zcmZWv1yodB*B(-0=G8KB&0{AQ()-s?iNwHySqV3kdlrc@%_U8o3&;= z=brQIeb3!<_MNkzbqY(N8tb7@l;vPxkpRCx%Hg0G6nYq?C*TW%!3zP!bdx>94)bq- z;6kxKqYM69s$KEZOsRQTcnX zQw#if@@Xat{H79g_zfVlW_uRz=Y1Fy;IQG)(6PH=#8s3JR2bA#c+|5EKDaZjEMxgx}gWSM81XIEkX!>&Z{Ia(#sGt-x(iKTSja~11@u|FYDQyWYo z-WsI7EFWmDnp;jH0pCI$;g0RW-cqPa*T>6%g8tf{>$j)-XwX*_zIp4tvHeQiLWiA7 zK3Bu4fEJH0x0oIFTN4M`U+67uvYFijBE=iCmt3uOFIkcu$l z?vN0d39*aWEVAHuNihIeV&X7{$#cEgOG5^x}X7H&{Q@?yb@#4CNJl7ao$B2MkS|l_gtWC zKDi<9s^SQB;PO0GldhT#aT@C$&^m+GZK6LgL6Ci8(qPkKW;iyHtYN;(JwT`Sos`s3 zKJSJ~Fxc&9!L_PAQ%VRVesuRh4S+lqOuK{FKW#eCjisHeB=$uW{N2dp(_Tml1|tx! z+x4bN-_xAAr?Ve8QvT@Gg;+*f*tS)iUm)VyR&8#Mp-UScR>*7dW3jiTHZMDn(0)G0 zh2@|+Vr6-V!<=t0vF)aTrMw(6^}Z!P%u!g%LZK(BF5>ad=)lZP+M{L4;5^Iz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yr~S%pnhPP+CQ=rzHQxUc zwr{QMG8?PnMJ%n9*qt}x^T!ztoSn+hozP_z<3S6<1WI$l|oX>ZpJ#OJ<$1N_fyhfH>idsm5Q$S(BZPdo+L zg;+qA7OcQ`W^Qgt8qg>z;EZRf4ljN(0&(H&Ft~Aa|kJ%Wz79vlr;q`c;>nB5=!QliG&sG1^4a zA!QDsqduy5X#OZ+S-Jk@PiMl_sLUrFAKCi!9UNVC&g?ejAECzKn8Qg}S>R(B@j__(Xhl!N5 zIOrbIT4Dh>ziPt$y?hd-0^V&QXQz81+Pzs38P@N){hY6?guCzphslc-onb;GeXz$W z^?`zjs4A<`yTkVtBbMZEl#eX7L?@sT&HM*jHhb|6WM$DI)6Fd_kgDvi3I3~?ak934RKRF< zp*s@}z>2?!G)b_Nuz%4o6lV-rh-*Wcl*6TKP;uB+a@Tw`&j0aQ-N0Vsi*#=u=k^T8RycUzLQQ_)AIbk9-1)Da$}HLRlV)bIMXsBvX<7S3U{& zg9;lo-JqfhwSA$g21Nr^B`B7w>ix}EGlBAK)eNBT18SPkcXIW=J?)33n*&A%6>f|?|- z)-+%}IL?2NY?&Y=HgGmGA{a><4NCrx z=!Y1v{)4Q<0(N1egq#78K${I!!w>>g4F7}pkrhG|1y5+BLC1DYn*=tM4U)wN?qJ6S zztjEO?T;pb&&rS^EHP9V7{PzohjBv4yx`9|*wAi&(;&sNdN!< diff --git a/src/net/citizensnpcs/Citizens.java b/src/net/citizensnpcs/Citizens.java index 9cc725565..4b479fe17 100644 --- a/src/net/citizensnpcs/Citizens.java +++ b/src/net/citizensnpcs/Citizens.java @@ -12,6 +12,7 @@ import java.util.logging.Level; import net.citizensnpcs.Settings.Setting; import net.citizensnpcs.api.CitizensAPI; import net.citizensnpcs.api.DataKey; +import net.citizensnpcs.api.exception.NPCException; import net.citizensnpcs.api.exception.NPCLoadException; import net.citizensnpcs.api.npc.NPC; import net.citizensnpcs.api.npc.trait.Character; @@ -205,13 +206,15 @@ public class Citizens extends JavaPlugin { if (!key.keyExists("name")) throw new NPCLoadException("Could not find a name for the NPC with ID '" + id + "'."); - // TODO better trait exception handling String type = key.getString("traits.type"); NPC npc = npcManager.createNPC( type.equalsIgnoreCase("DEFAULT") ? CreatureType.MONSTER : CreatureType.valueOf(key.getString( "traits.type").toUpperCase()), id, key.getString("name"), null); - - npc.load(key); + try { + npc.load(key); + } catch (NPCException ex) { + Messaging.log(ex.getMessage()); + } ++created; if (npc.isSpawned()) ++spawned; diff --git a/src/net/citizensnpcs/trait/LookClose.java b/src/net/citizensnpcs/trait/LookClose.java index 2e4158c2c..b935ba79f 100644 --- a/src/net/citizensnpcs/trait/LookClose.java +++ b/src/net/citizensnpcs/trait/LookClose.java @@ -1,8 +1,11 @@ package net.citizensnpcs.trait; import net.citizensnpcs.api.DataKey; +import net.citizensnpcs.api.exception.NPCLoadException; +import net.citizensnpcs.api.npc.trait.SaveId; import net.citizensnpcs.api.npc.trait.Trait; +@SaveId("look-close") public class LookClose implements Trait { private boolean shouldLookClose; @@ -14,13 +17,12 @@ public class LookClose implements Trait { } @Override - public String getName() { - return "look-close"; - } - - @Override - public void load(DataKey key) { - shouldLookClose = key.getBoolean(""); + public void load(DataKey key) throws NPCLoadException { + try { + shouldLookClose = key.getBoolean(""); + } catch (Exception ex) { + throw new NPCLoadException("Invalid value. Valid values: true or false"); + } } @Override