From f1bc5dba8f860b3344db9c6b0a4d8ed31e72c0cd Mon Sep 17 00:00:00 2001 From: aPunch Date: Sun, 22 Jan 2012 01:52:46 -0600 Subject: [PATCH 1/3] formatting fun --- lib/CitizensAPI.jar | Bin 12816 -> 13709 bytes src/net/citizensnpcs/npc/CitizensNPC.java | 15 ++++++------- .../citizensnpcs/npc/CitizensNPCManager.java | 9 ++++---- .../npc/trait/CitizensTraitManager.java | 5 ++--- src/net/citizensnpcs/test/StorageTest.java | 2 +- src/net/citizensnpcs/util/ByIdArray.java | 20 +++++++----------- 6 files changed, 21 insertions(+), 30 deletions(-) diff --git a/lib/CitizensAPI.jar b/lib/CitizensAPI.jar index daf2f0e34cfc3bfc04422e4a6e9fe4dd167dfacf..3e3dc919ca3eb507d9e732ce1a48309db1d86bd6 100644 GIT binary patch literal 13709 zcmbVz1z1&E^FAfr-Q7qdAl=dpQYwc$G}4W9NwO z-|xS9)&ZVpuXom(J$q)>%zG4NAfe#FZmw=5PNDz&@$&-?3<^w6TveD+N?wBbssjv6 z@#n3uU|pbF8^l7lwL!NUfd(dM{C%sOu)LInxQZ&1oWy}#SEsBDBU3+;3?qF{S8u5@ z%MknAl1-N=`pbusvOSV&V8P&2-A9Pd)yW~s7&6K#b}95;>x@T;_R)y1F*&?t4lv!= zqeJ#X7(!%}Z9}m54x)}YoU5Ix|6a_0uNw-q7)wJt=D(Kv-*=$>yhGo_&cwyg($>;i z-}Vo;WBu-SfVIgVrV!jW#n8df@=r@6xp$(IzM-|9iIwFaq~hH-8MMJaOr!eKG;4qz z(8$Enz{Jw{4-oe*`$n>z4Z!42d;X*RACrHDfc=lHY8@u3@I!!sRXzX%qrPtoqCX$8 zu%Z-`zB$0wHZ*$6YCsXQ^)12!X*x)Mp4kA`NE|=;%7mPjmWYIeqId&?AQI+h&D$*^ z6Fn$bYCZ7}`&$aBuasJCWmMAW^xe2ujt`wZrfe;D-Zlt&fI9`pL1PU+9LQ-`j87wL z&OjtKi^;>|z*7a(5?9KF01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cX*)gorL3OCB zn|~2~Ct+t&ImjU9tFJbZ-5o)0{{|vio@>UzlM-5qKD#lWnzrGC5v!p`JA>mc+pE$H zAFDL&>sXlQb|Kp6th>m0>ZO_p{s|#TR}o55sgQOBOxlGd1hu0zS_Pj-Y-nB0q=W}4 zG-;P4$4Cln2FmOfeWscOO)klcAS4sGRc{Me6XDk$U&-jKHmdsZv@Y?c>@`Y!>r$K* zt3t8{6|WU#8af+<=6OX*keTx-yBWQc$LW{t{dfsRH|;PFpk~*RmQ9Y=Rmg(VZs6PT zK3+qrU~y6+1vDSaLs|&0%JQPe0KAUXq>gXbwj=bN`_ny#OhiLt9PKmEENX+PPj44n zSgcoZ_Qyi5u$Yk-6?!yb+?v~_o|NLpfdIC74lFIN1{rSp1+El%3eI6o(>zY0#Hhf; z{mtm#nCYTd!-O^p8!1*I$e*1zW^>?;bD4f^qZRqwC0H9*HhYKp;7mdR#%`PUT`ZsP zD>Y9*(LjD|f<9j1eAop2nSQqyDku2^<2|eoJzlZ-8Lt}RH+VlS6FtUzc<0BfA`f}M4|)&z8$6@m zt?B%V{dkMuVcFydF+=|&_TR3a{EGf~Z2R+*JHq}O`mcKlzhXZg8$PtNe-IGi->@Ie z2Y-cqJX?Bbm;E3fq<@6{OU?dk0{QC=k0&M%*~kyFLHXSce+@OAA>)b{p0q-LznFb zP28`-|NlMyzx3RGy*l|(>HE;%_(7BS|JSSkTSgBr`MA1#D5ZbU1mQp2^hdJ!JyHLA z+{abb&sH!`^sl&oU#b4eq{sEf&(4jT factory) { if (registered.get(name) != null) - throw new IllegalArgumentException("trait factory already registered"); + throw new IllegalArgumentException("Trait factory already registered."); registered.put(name, factory); } diff --git a/src/net/citizensnpcs/test/StorageTest.java b/src/net/citizensnpcs/test/StorageTest.java index 119595366..f11673183 100644 --- a/src/net/citizensnpcs/test/StorageTest.java +++ b/src/net/citizensnpcs/test/StorageTest.java @@ -8,4 +8,4 @@ public class StorageTest { public void testYaml() { } -} +} \ No newline at end of file diff --git a/src/net/citizensnpcs/util/ByIdArray.java b/src/net/citizensnpcs/util/ByIdArray.java index 42407403b..357a7765e 100644 --- a/src/net/citizensnpcs/util/ByIdArray.java +++ b/src/net/citizensnpcs/util/ByIdArray.java @@ -49,17 +49,13 @@ public class ByIdArray implements Iterable { return (T) elementData[index]; } - /*@SuppressWarnings("unchecked") - public T[] toArray(T[] a) { - if (a.length < size) - // Make a new array of a's runtime type, but my contents: - return (T[]) Arrays.copyOf(elementData, size, a.getClass()); - System.arraycopy(elementData, 0, a, 0, size); - if (a.length > size) - a[size] = null; - return a; - } - */ + /* + * @SuppressWarnings("unchecked") public T[] toArray(T[] a) { if (a.length < + * size) // Make a new array of a's runtime type, but my contents: return + * (T[]) Arrays.copyOf(elementData, size, a.getClass()); + * System.arraycopy(elementData, 0, a, 0, size); if (a.length > size) + * a[size] = null; return a; } + */ @Override public Iterator iterator() { @@ -136,4 +132,4 @@ public class ByIdArray implements Iterable { public boolean contains(int index) { return elementData.length > index && elementData[index] != null; } -} +} \ No newline at end of file From d996722643fa88938ad69d50741508abcc6e17b9 Mon Sep 17 00:00:00 2001 From: aPunch Date: Sun, 22 Jan 2012 01:58:02 -0600 Subject: [PATCH 2/3] more formatting --- src/net/citizensnpcs/Citizens.java | 4 ++-- src/net/citizensnpcs/EventListen.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/net/citizensnpcs/Citizens.java b/src/net/citizensnpcs/Citizens.java index b1a624642..b880fe811 100644 --- a/src/net/citizensnpcs/Citizens.java +++ b/src/net/citizensnpcs/Citizens.java @@ -101,9 +101,9 @@ public class Citizens extends JavaPlugin { NPC npc = npcManager.createNPC(key.getString("name"), character); // Load the character if it exists, otherwise remove the character - if (character != null) { + if (character != null) character.load(key.getRelative(character.getName())); - } else { + else { if (key.keyExists("character")) { Messaging.debug("Character '" + key.getString("character") + "' does not exist. Removing character from the NPC with ID '" + npc.getId() + "'."); diff --git a/src/net/citizensnpcs/EventListen.java b/src/net/citizensnpcs/EventListen.java index 22322c5b2..7475e4e57 100644 --- a/src/net/citizensnpcs/EventListen.java +++ b/src/net/citizensnpcs/EventListen.java @@ -39,9 +39,8 @@ public class EventListen implements Listener { EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event; if (e.getDamager() instanceof Player) { NPC npc = manager.getNPC(event.getEntity()); - if (npc.getCharacter() != null) { + if (npc.getCharacter() != null) npc.getCharacter().onLeftClick(npc, (Player) e.getDamager()); - } } } } From 8526671eaf062321f4567ae112324bff3890d54b Mon Sep 17 00:00:00 2001 From: aPunch Date: Sun, 22 Jan 2012 02:02:49 -0600 Subject: [PATCH 3/3] more formatting again --- src/net/citizensnpcs/EventListen.java | 2 +- src/net/citizensnpcs/Settings.java | 3 +-- src/net/citizensnpcs/util/ByIdArray.java | 16 ++++------------ 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/net/citizensnpcs/EventListen.java b/src/net/citizensnpcs/EventListen.java index 7475e4e57..599de2094 100644 --- a/src/net/citizensnpcs/EventListen.java +++ b/src/net/citizensnpcs/EventListen.java @@ -34,7 +34,7 @@ public class EventListen implements Listener { if (!manager.isNPC(event.getEntity())) return; - event.setCancelled(true); // TODO: implement damage handlers + event.setCancelled(true); if (event instanceof EntityDamageByEntityEvent) { EntityDamageByEntityEvent e = (EntityDamageByEntityEvent) event; if (e.getDamager() instanceof Player) { diff --git a/src/net/citizensnpcs/Settings.java b/src/net/citizensnpcs/Settings.java index 9a0dad275..560d78f31 100644 --- a/src/net/citizensnpcs/Settings.java +++ b/src/net/citizensnpcs/Settings.java @@ -52,14 +52,13 @@ public class Settings { } private final YamlStorage config; - private final DataKey root; public Settings(Citizens plugin) { config = new YamlStorage(plugin.getDataFolder() + File.separator + "config.yml"); - root = config.getKey(""); } public void load() { + DataKey root = config.getKey(""); for (Setting setting : Setting.values()) { if (!root.keyExists(setting.getPath())) { Messaging.log("Writing default setting: '" + setting.getPath() + "'"); diff --git a/src/net/citizensnpcs/util/ByIdArray.java b/src/net/citizensnpcs/util/ByIdArray.java index 357a7765e..52b6cd811 100644 --- a/src/net/citizensnpcs/util/ByIdArray.java +++ b/src/net/citizensnpcs/util/ByIdArray.java @@ -16,7 +16,7 @@ public class ByIdArray implements Iterable { public ByIdArray(int capacity) { if (capacity < 0) - throw new IllegalArgumentException("illegal capacity"); + throw new IllegalArgumentException("Illegal capacity: cannot be below 0."); elementData = new Object[capacity]; } @@ -49,14 +49,6 @@ public class ByIdArray implements Iterable { return (T) elementData[index]; } - /* - * @SuppressWarnings("unchecked") public T[] toArray(T[] a) { if (a.length < - * size) // Make a new array of a's runtime type, but my contents: return - * (T[]) Arrays.copyOf(elementData, size, a.getClass()); - * System.arraycopy(elementData, 0, a, 0, size); if (a.length > size) - * a[size] = null; return a; } - */ - @Override public Iterator iterator() { return new Iterator() { @@ -73,9 +65,9 @@ public class ByIdArray implements Iterable { T next = (T) elementData[idx]; if (next == null || idx > highest) throw new NoSuchElementException(); - do { + do idx++; - } while (idx != highest + 1 && elementData[idx] == null); + while (idx != highest + 1 && elementData[idx] == null); return next; } @@ -88,7 +80,7 @@ public class ByIdArray implements Iterable { public void put(int index, T t) { if (t == null) - throw new IllegalArgumentException("t cannot be null"); + throw new IllegalArgumentException("'t' cannot be null."); ++modCount; if (index > highest) highest = index;