summaryrefslogtreecommitdiff
path: root/sources/events/VSRegisteredEvents.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-05-27 20:13:54 +0000
committerPaul Buetow <paul@buetow.org>2008-05-27 20:13:54 +0000
commit23055ca47090021dbf84d05d5e14c8990479bfe1 (patch)
tree36edcf38df1569abb3f81f92cf6b6acc1689b714 /sources/events/VSRegisteredEvents.java
parentfae58d2173039e70ad94075d49c0c500e935e454 (diff)
onServerStart vs onClientStart works.
Diffstat (limited to 'sources/events/VSRegisteredEvents.java')
-rw-r--r--sources/events/VSRegisteredEvents.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/sources/events/VSRegisteredEvents.java b/sources/events/VSRegisteredEvents.java
index 52cb042..05857be 100644
--- a/sources/events/VSRegisteredEvents.java
+++ b/sources/events/VSRegisteredEvents.java
@@ -42,6 +42,9 @@ public final class VSRegisteredEvents {
private static HashMap<String,ArrayList<String>> serverVariables =
new HashMap<String,ArrayList<String>>();
+ private static HashMap<String,Boolean> isOnServerStartProtocol =
+ new HashMap<String,Boolean>();
+
/** The prefs. */
private static VSPrefs prefs;
@@ -95,6 +98,9 @@ public final class VSRegisteredEvents {
variables.addAll(clientProtocol.getAllFullKeys());
clientVariables.put(protocolClassname, variables);
}
+
+ if (serverProtocol.hasOnServerStart())
+ isOnServerStartProtocol.put(protocolClassname, new Boolean(true));
}
}
}
@@ -245,6 +251,20 @@ public final class VSRegisteredEvents {
}
/**
+ * Checks if the protocol uses onServerStart or onClientStart
+ *
+ * @param protocolClassname the protocol's classname
+ *
+ * @return true if onServerStart, false if onClientStart
+ */
+ public static boolean isOnServerStartProtocol(String protocolClassname) {
+ if (isOnServerStartProtocol.containsKey(protocolClassname))
+ return isOnServerStartProtocol.get(protocolClassname).booleanValue();
+
+ return false;
+ }
+
+ /**
* Creates the event instance by classname.
*
* @param eventClassname the event classname