Quick questions thread: Ask your "How do I?" and "Where is?" questions here.

Discussion in 'Help and Support' started by nicatronTg, Jan 18, 2012.

  1. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,597
    Hooks are ordered based on priority. If no priority is given, the plugin's Order is used.
    Higher priority hooks go first, if two hooks have the same priority then first registered goes first.
    Add a priority using
    Code:
    ServerApi.Hooks.Hook.Register(Plugin, Method, Priority);
     
  2. GrandPa-G

    GrandPa-G Developer of many plugins
    Plugin Developer Zero Day Plugin Author

    Joined:
    Jan 4, 2015
    Messages:
    400
    ok I get the priority idea now. Does setting args.handler=true then stop any of the following hooks from firing? If so, is that a no-no in a plugin?
     
  3. GrandPa-G

    GrandPa-G Developer of many plugins
    Plugin Developer Zero Day Plugin Author

    Joined:
    Jan 4, 2015
    Messages:
    400
    If I want my plugin to not be available based upon a TShock config option, like using MySQL as db, it is possible to have the plugin not load (or unload) after checking? Or do I just not add my command to the ChatCommands list?
     
  4. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,597
    args.Handled = true should stop the API doing anything after the hook. I haven't played with hook orders in a while so I'm not sure if it stops other plugins handling the hook also
    Probably just don't add your commands to the list
     
  5. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    How do I make sign commands? Which plugin do i need?
     
  6. Wight

    Wight Administrator
    TShock Admin TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    May 20, 2012
    Messages:
    1,597
    • Agree Agree x 2
  7. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    645
    We've used your build for a while and no major problems. Vanilla permisions (essentials.sign.use I think was the one) seem to have problems, but custom-made ones with the addperm option work flawlessly in place of those.
     
  8. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    The plugin is made for the API 1.16, is it safe to use with the API patcher?

    Thanks
     
  9. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    645
    At the very least I use it with the patcher, and so far the only issue I have found is what I wrote above.
     
  10. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    I've added numerous of perms and still can't use the sign commands from specific group. They work on my superadmin, but I cant manage in other groups.

    What permission exactly do i need?

    I've tried:

    essentials.signs.use.command
    essentials.signs.break
    essentails.signs.use.spawnmob

    A lot other similar perms to those.
     
  11. Patrikk

    TShock Mod TShock Contributor Plugin Developer

    Joined:
    May 25, 2012
    Messages:
    104
  12. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    I've read all that and tried numerous combination of it, still having difficulty getting it to work >_<
     
  13. Patrikk

    TShock Mod TShock Contributor Plugin Developer

    Joined:
    May 25, 2012
    Messages:
    104
    Sign should be

    [Sign Command]
    >spawnmob 2 1

    and group would need
    essentials.signs.use.spawnmob
    To use it.
    It should be simple :/ don't really get it whats wrong in your setup
     
  14. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    [​IMG] [​IMG]
    I notice that every time restart the server i have to open/close the sign to "create" it again with my superadmin to be able to spawn it after. But still it does not work on the other groups.
    [​IMG]
    The below command works in my superadmin character, but not the "Twitcher" group i want it to work on.
    [​IMG]
     
    #894 kenichi2k5, May 20, 2015
    Last edited: May 20, 2015
  15. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    645
    As. I. Said. Above.
    The original permissions to use the plugins either are broken or changed on WhiteX's build. The original permission to use signs will not work on WhiteX's fork.
    There is a post God-knows-where from WhiteX listing some of his fork's features, among them being an "rperm" line to the sign, which once added will require said custom permission in order to use the sign.

    Let me look that up for you... *opens advanced search*

    -5 minutes later-
    Ok, enjoy...
     
    • Winner Winner x 2
  16. Patrikk

    TShock Mod TShock Contributor Plugin Developer

    Joined:
    May 25, 2012
    Messages:
    104
    ooooo, didnt know he's using a totally modified version :|
     
  17. kenichi2k5

    kenichi2k5 Level 2

    Joined:
    May 10, 2015
    Messages:
    41
    Kojiro that worked, thank you for your time searching that for me! Really appreciated!

    Kojiro marry me. nohomo :3 lololol
     
    • Funny Funny x 1
  18. irajacobs

    irajacobs Level 1

    Joined:
    Feb 16, 2014
    Messages:
    17
    Nobody seems to have answered this....I can't figure out /ossc either.
     
  19. Patrikk

    TShock Mod TShock Contributor Plugin Developer

    Joined:
    May 25, 2012
    Messages:
    104
    tshock.admin.savessi
    Description: User can save all the players SSI state.
    Commands: /overridessc(/ossc) /savessc

    Thats what ossc does. Saves everyone's inventory to the database.

    I do not know about any current public way of getting your sp inventory into ssc.
    Alternative solution would be to put down your stuff in a chest, then turn on ssc.
     
  20. irajacobs

    irajacobs Level 1

    Joined:
    Feb 16, 2014
    Messages:
    17
    Yep that's what I ended up doing, turned off SSC and tossed stuff in chests, then put SSC back on. Seems like that command is useless presently, there's no way to use it that I could find.