From eb7cedd6fd5dae2353bdd47b2ce09942460fd8a6 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Fri, 11 Jan 2013 19:59:22 -0500 Subject: Revert "Remove GM from 3.0" This reverts commit a4c93fef05493e6210e8d3d72af7b6d492f4e121. --- .../events/GroupManagerEventHandler.java | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java new file mode 100644 index 000000000..5fc555cc4 --- /dev/null +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java @@ -0,0 +1,53 @@ +package org.anjocaido.groupmanager.events; + +import org.anjocaido.groupmanager.data.Group; +import org.anjocaido.groupmanager.data.User; + +/** + * @author ElgarL + * + * Handles all Event generation. + * + */ +public class GroupManagerEventHandler { + + protected static void callEvent(GMGroupEvent event) { + + event.schedule(event); + } + + protected static void callEvent(GMUserEvent event) { + + event.schedule(event); + } + + protected static void callEvent(GMSystemEvent event) { + + event.schedule(event); + } + + public static void callEvent(Group group, GMGroupEvent.Action action) { + + callEvent(new GMGroupEvent(group, action)); + } + + public static void callEvent(String groupName, GMGroupEvent.Action action) { + + callEvent(new GMGroupEvent(groupName, action)); + } + + public static void callEvent(User user, GMUserEvent.Action action) { + + callEvent(new GMUserEvent(user, action)); + } + + public static void callEvent(String userName, GMUserEvent.Action action) { + + callEvent(new GMUserEvent(userName, action)); + } + + public static void callEvent(GMSystemEvent.Action action) { + + callEvent(new GMSystemEvent(action)); + } +} \ No newline at end of file -- cgit v1.2.3