001 /** 002 * PluginRegisteredListener - Stores the registered listeners 003 * 004 * @author Maine 005 */ 006 public class PluginRegisteredListener { 007 008 private PluginLoader.Hook hook; 009 private PluginListener listener; 010 private Plugin plugin; 011 private int priority; 012 013 /** 014 * Creates a register listener class for calling later. 015 * 016 * @param h 017 * The hook this registered listener is for 018 * @param l 019 * The plugin listener itself 020 * @param p 021 * The plugin itself 022 * @param pri 023 * The priority of this listener 024 */ 025 public PluginRegisteredListener(PluginLoader.Hook h, PluginListener l, Plugin p, int pri) { 026 hook = h; 027 listener = l; 028 plugin = p; 029 priority = pri; 030 } 031 032 /** 033 * Returns the hook for this listener 034 * 035 * @return hook 036 */ 037 public PluginLoader.Hook getHook() { 038 return hook; 039 } 040 041 /** 042 * Returns the listener 043 * 044 * @return listener 045 */ 046 public PluginListener getListener() { 047 return listener; 048 } 049 050 /** 051 * Returns this listener's plugin 052 * 053 * @return plugin 054 */ 055 public Plugin getPlugin() { 056 return plugin; 057 } 058 059 /** 060 * Returns this listener's priority 061 * 062 * @return priority 063 */ 064 public int getPriority() { 065 return priority; 066 } 067 }