From 7fc22a2e27e8cadffbafa7d2087e2bbc7520519a Mon Sep 17 00:00:00 2001 From: aPunch Date: Wed, 25 Jan 2012 17:09:02 -0600 Subject: [PATCH] fix reload bug --- lib/CitizensAPI.jar | Bin 17711 -> 17709 bytes src/net/citizensnpcs/Citizens.java | 4 ++++ 2 files changed, 4 insertions(+) diff --git a/lib/CitizensAPI.jar b/lib/CitizensAPI.jar index 94097ea3b148e13b9dad3920df95bdbeb2eddce6..9018a757de4c03bdba39e1d43c095757b45d6135 100644 GIT binary patch delta 1065 zcmV+^1lIeniUF;P0Sr(}0|W{H00000HHeW6DFQTzu{WVK2{nj0K)*v2Ny(GpG(~^y za@$l8JvVkNMOMDlBn`oY^n=#1aRg~o2q^(l;Q}>jA*tJxPuUi(5=Sz!+>kOn0y8{A zp8#gS0XoA2@K6l9k|R5=2=K$ZcdvKPIeYhB{rT7Le*joUTfqWWNAM!vkg+D=x{Nm! ztm7>OZ{r;q8ywt_VaRw_Mp4F11xbIr$L9SsKEN&hzr^8(yxQc|Z8mqbmXN{yL>) z7s~?48*a@K7%$n5wb|aUSl+f-Y0!?wHI1_A*&KH_lm0`yC2+OmSiWAhefxj0<+Pk; zwWXU)Tc?HYdnWOPcB^R~IDOQ!*;q|1L#kW;rnyfPQ`yDRuKCE+8>Um&w|vib>QtL- zxMoe@TsEHCFn#lubr@hJ_N+sJ`O^~#v1L9YzBDl(OA$Cr?D6N8ZuRHMz8gvtP`2E* zSG9_EaB3%dUgAbnT*ON%&f|Xql{F%SGchy*!w0U{s7d%##b@|j!WSyOgef4tQBeVn zRZwfp~i`pgs)V*jDm_fXxqlFiaj(`?DNWD{?X#}yd@bJ=Gr4Z|oF`NmFV zV{s=2_lT<1>+^C9RSY>lauRqyc=1LEajbSG2EsV5*a_VO`ety%_l*#W;ThfGi%0*M z&8Fp$u)=>j^zIE?8_0hT@4_khI7eUB1r5=B?Y3-ZIcBZ!}9 zF@(!x74m>e-_KEGgH@1(MdZjcK)wr5q)g6L7$BGb1w%cQF(k;26UqceFc~1tgxOsr zUa>3|K@YHtS?G#NXo(*quvD-$-6tmz$ytKlE!`)Xk_K3SPmhfy(8G`U&;PS!H6){fwaw#(%?v zKnIgVAMR)!oFNrqFck#pFqjSkH4J9H52Dd9I?GW{+dL$)3($h`o~LuWfK{5vO&aQ5 zQqt2~j`Wrzy;oeQr%?_gO*Slj+4U9ZIxB}HI^$AHuLQ>JVuSMhL zE5tmRrEe}Ifn}gHHbMtze5yB$&<)LVFv9u000003eNvU delta 1067 zcmV+`1l0SjiUF^R0Sr(}0|W{H00000ElH6KDFQ4>u{WVK2@oVVK)A~!^8kraV5#2$ZcnPzvM>^Xrnf%Jyc zaw}%R@=xtp&-2`ff*D*^a1no(sH`3#oQ|Op=-+qTdR4+_3O>gd624UM6$}CKt%5RW ztb$q-Pbslsd6jKy_Q2R@hAJnT624aO8s-$#u&uztj)Gm(73{HRvvJT+@C_Q&Ywt0y zwXAy8bOnZvb@8177fm)EaeuGiI_3lx{{Iya817KsEAN;U0-X65oK1hW0+T0AQ(%Cm zcr=hJ+KU$`_D+p-jbP1RXhH<^kZ15RoUR%_ZzUklJ1zf(jKvk@1rNB)b?2M|YU$73M!M-^Ma@;Eq@`{8}lW()KY;lGW2 za*Rg9v`N_9e>(K=hOK|}f` zV_2Y#5uy)v)HY6&iXa&EgG>;N`GFDy<3IS(U=W?*sH1HP64_}w&x+R%IU76nrD*J{;n-6>BM%O4o@(?iA*o16DjN6o zXxw~-m}l}iCbkaoih8zUr|pnCjKH*rjhW()XsH_0~U7O928D0}22D0000j lNt63HIRY$6vo<-03zMKh1O>RuFQdzo#zbKT?>GPe007B}{{jF2 diff --git a/src/net/citizensnpcs/Citizens.java b/src/net/citizensnpcs/Citizens.java index bd70e1371..8f9d35c1a 100644 --- a/src/net/citizensnpcs/Citizens.java +++ b/src/net/citizensnpcs/Citizens.java @@ -113,8 +113,12 @@ public class Citizens extends JavaPlugin { @Override public void onDisable() { + // Save an despawn all NPCs config.save(); saveNPCs(); + for (NPC npc : npcManager.getSpawnedNPCs()) + npc.despawn(); + Bukkit.getScheduler().cancelTasks(this); Messaging.log("v" + getDescription().getVersion() + " disabled.");