Esempio n. 1
0
 /// <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(Level.OnLevelSave 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 OnLevelSaveEvent(method, priority, plugin));
     Organize();
 }
 internal OnLevelSaveEvent(Level.OnLevelSave method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }
Esempio n. 3
0
 internal OnLevelSaveEvent(Level.OnLevelSave method, Priority priority, Plugin plugin)
 {
     this.plugin = plugin; this.priority = priority; this.method = method;
 }