Forgot to implement handlelist -= handler
This commit is contained in:
parent
ee5e465218
commit
5ba0efb5cc
1 changed files with 12 additions and 0 deletions
|
|
@ -92,6 +92,18 @@ namespace TShockAPI
|
||||||
hand.Register(Create(handler));
|
hand.Register(Create(handler));
|
||||||
return hand;
|
return hand;
|
||||||
}
|
}
|
||||||
|
public static HandlerList<T> operator -(HandlerList<T> hand, HandlerItem obj)
|
||||||
|
{
|
||||||
|
return hand - obj.Handler;
|
||||||
|
}
|
||||||
|
public static HandlerList<T> operator -(HandlerList<T> hand, EventHandler<T> handler)
|
||||||
|
{
|
||||||
|
if (hand == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
hand.UnRegister(handler);
|
||||||
|
return hand;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum HandlerPriority
|
public enum HandlerPriority
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue