Vanish No Packet

Vanish No Packet

855k Downloads

Save Toggles to File

Fogest opened this issue ยท 2 comments

commented

I think it would be nice if toggles are saved to a file, so that users do not have to reset the toggles they have whenever a restart, or reload occurs.

commented

Not currently planned. Possibly, maybe in 4.0

commented

If you got CommandHelper installed, try this (ugly) workaround:

/vanish [$] = >>>
   assign(@args, parse_args($))
   if(equals(array_size(@args), 2)
    , if(equals_ic(@args[0], 'effects')
       , assign(@effect, to_lower(@args[1]))
         if(array_contains(array('smoke', 'lightning', 'explode'), @effect)
          , if(has_permission('vanish.effects.toggle.' . @effect)
             , # All fine: effect is valid and player can toggle it.
               assign(@node, 'vanish.effects.' . @effect)
               if(has_permission(@node)
                , runas(~console, 'exec u:' . player() . ' a:rmperm v:' . @node)
                  runas(~console, 'exec u:' . player() . ' a:addperm v:^' . @node)
                , runas(~console, 'exec u:' . player() . ' a:rmperm v:' . @node)
                  runas(~console, 'exec u:' . player() . ' a:addperm v:' . @node)
               )
            )
         )
      )
   )
   run(get_cmd())
<<<

PS: I'm assuming here that you got bPermissions, but similar syntaxes can be done to other plugins.