/// <summary> /// Register this event /// </summary> /// <param name="method">This is the delegate that will get called when this event occurs</param> /// <param name="priority">The priority (imporantce) of this call</param> /// <param name="plugin">The plugin object that is registering the event</param> /// <param name="bypass">Register more than one of the same event</param> public static void Register(Player.OnPlayerRotate method, Priority priority, Plugin plugin, bool bypass = false) { if (Find(plugin) != null) { if (!bypass) { throw new Exception("The user tried to register 2 of the same event!"); } } events.Add(new PlayerRotateEvent(method, priority, plugin)); Organize(); }
internal PlayerRotateEvent(Player.OnPlayerRotate method, Priority priority, Plugin plugin) { this.plugin = plugin; this.priority = priority; this.method = method; }