-- Create a new plugin for Clique, with the shortname "test" local Plugin = Clique:NewModule("selfcast") Plugin.fullname = "Cast-on-self" -- Plugin:Test() is called anytime the mod tries to enable. It is optional -- but it will be checked if it exists. Will typically be based off some global -- or the state of the addon itself. local SELF_CLICKS = "Cast-on-self" function Plugin:OnEnable() Clique.db.char[SELF_CLICKS] = Clique.db.char[SELF_CLICKS] or {} end function Plugin:_OnClick(button, unit) unit = unit or Clique.unit local friendly = Clique:GetFriendlyUnit(unit) if unit == "player" or friendly == "player" then Clique.set = SELF_CLICKS return true end end