From 5b195299badac21ae3a16de49d62a32866d00f19 Mon Sep 17 00:00:00 2001 From: ElgarL Date: Tue, 13 Dec 2011 17:32:39 +0000 Subject: Update event Action names to be unique --- .../events/GroupManagerEventHandler.java | 42 ++++++++++++++++++++++ 1 file changed, 42 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..83cac393d --- /dev/null +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/events/GroupManagerEventHandler.java @@ -0,0 +1,42 @@ +package org.anjocaido.groupmanager.events; + +import org.anjocaido.groupmanager.GroupManager; +import org.anjocaido.groupmanager.data.Group; +import org.anjocaido.groupmanager.data.User; + + + +/** + * @author ElgarL + * + */ +public class GroupManagerEventHandler { + + protected static void callEvent(GMGroupEvent event) { + GroupManager.callEvent(event); + } + protected static void callEvent(GMUserEvent event) { + GroupManager.callEvent(event); + } + protected static void callEvent(GMSystemEvent event) { + GroupManager.callEvent(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