[ADMN/CHAT/MISC] bInfo 0.5 - providing a universal prefix/suffix from SuperPerms nodes [1000]

Discussion in 'Inactive/Unsupported Plugins' started by codename_B, Jul 26, 2011.

  1. Offline

    codename_B

    bInfo
    prefix/suffix based on SuperPerms permission nodes

    Download 0.5
    Github


    About:
    bInfo is designed to bridge the gap between boolean permissions and the need for a prefix suffix to be available to chat plugins. bInfo is designed for use with bPermissions but will work equally as well with any superperms manager - eg. BukkitPerms.


    Plugin devs - how to implement:
    Place this class in your source code.

    Implement using this general idea.
    Code:
    Import com.ubempire.binfo.PlayerInfo;
    
    public PlayerInfo infoservice;
    
    onEnable() {
    try {
        infoservice = getServer().getServicesManager().load(PlayerInfo.class);
          }
    catch (java.lang.NoClassDefFoundError e) {
        System.out.println("bInfo not installed!");
    }
    }
    
    onPlayerChat(PlayerChatEvent event) {
    Player myPlayer = event.getPlayer();
       String prefix = "";
    if (infoservice != null)
        prefix = plugin.infoservice.getPrefix(myPlayer);
    }
    
    or as a provider copying this. KEEP THE NAMESPACE.
    Code:
    package com.ubempire.binfo;
    
    import org.bukkit.entity.Player;
    
    public interface PlayerInfo {
        
        public String getPrefix(Player player);
        
        public String getSuffix(Player player);
    
        }
    
    Server admins - how to setup:
    Code:
    groupname:
        prefix: '%RED%[ADM'
        suffix: '%BLUE%IN]'
        node: 'adm.in'
    anotherexample:
         prefix: '[EXAM'
         suffix: '%BLACK%PLE]'
         node: "bInfo.anotherexample"
    
    Color Codes
    Code:
    %AQUA%
    %BLACK%
    %BLUE%
    %DARK_AQUA%
    %DARK_BLUE%
    %DARK_GREEN%
    %DARK_PURPLE%
    %DARK_RED%
    %GOLD%
    %GRAY%
    %GREEN%
    %LIGHT_PURPLE%
    %RED%
    %WHITE%
    %YELLOW%
     
    Plugins which use bInfo for prefix/suffix:
    Changelog:
    26/07/2011 - v0.3 - released to public, adding instructions soon
    30/07/2011 - v0.4 - added services API - now you can hook in via bukkit services!
    02/08/2011 - v0.5 - added ChatColor support
     
  2. Offline

    noahwhygodwhy

    wtf? really? though this does sound cool, i'll be refreshing this page every 5 minutes. :)
     
  3. Offline

    jeffreylec

    This is going to be the best thing that has ever happen if this actually is going to work! Info, specifically prefixes and suffixes for groups and users has kept me away from superperms.
     
  4. Offline

    codename_B

    Takes a couple of days to write seriously good documentation I'm afraid :p
    It already works :D just writing the documentation atm!
     
  5. Offline

    PatrickFreed

    Screw this B, work on modifying MC gravity :p
     
  6. Offline

    noahwhygodwhy

    lol, get halo texture pack and turn speed up to 300 and gravity down to 25...it's halo 3 all over again,
     
  7. Offline

    iwasnumber4

    what is this supposed to be? i am looking for a prefix plugin and this one is interesting,
     
  8. Offline

    codename_B

    finished the tutorials :D
     
  9. Offline

    Nijikokun

    \o/ copying ideas is awesome, this however is not that. So people who keep trying to say he is copying, stop.
     
  10. Offline

    codename_B

    Aww thanks Niji :) I didn't notice your post till now.
    \o/
     
  11. Offline

    MiracleM4n

    Fawk....I just finished coding something exactly like this...
     
  12. Offline

    codename_B

    No reason that we both can't have it - if you use the same way of providing the data that I do - we can start setting a standard interface for other plugins to use - while still giving the users the choice of how they want to get the data.

    Coming soon - ChatColors!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  13. Offline

    jessenic

    @codename_B, could you please provide a command for reloading these:
    public HashMap<String, String> playerPrefix = null;
    public HashMap<String, String> playerSuffix = null;

    Because if I change player's group the server needs a restart to prefixes/suffixes get into effect.
     
  14. Offline

    codename_B

    That's right on my to-do list.

    You get to choose the command - it just needs a command name now - what would you like?
     
  15. Offline

    jessenic

    /binfo or /binfo reload would be fine :p
     
  16. Offline

    JukeboxJohnny

    Alright. I'm just wanting to make sure I understand this correctly. I have 3 groups: Builder, Mod, Admin. So I need to make 3 group entries.

    Is this correct:

    Code:
    Builder:
          prefix: ''
          suffix: ''
        node: 'builder'
    Mod:
          prefix: ''
          suffix: ''
          node: 'mod'
    Admin
         prefix: ''
         suffix: ''
         node: 'admin'
     
  17. Offline

    Uzalu

    hi, i may have misunderstood exactly how to use this, but currently, my server works as if this assumption is right:

    Inheritance in bPermissions is breaking this, meaning that every rank gets the 'User' group prefix permissions because they inherit them. How can i make higher ranks have more priority (in prefix permissions) than lower ranks?

    I will play around a bit with this, but may have to go back to iChat... thanks for your help!

    EDIT: Worked it out. For everyone else with this problem: the higher items in the config have more priority than lower ones. put admin at the top etc.

    Recommend you add this more explicitly in the description :)
     
  18. Offline

    SulimirCular

    I just can't get it to work for me. Everytime I mess up the config of my bPermissions.
    Could anyone provide me an example for bPermissions group config?
     
  19. Offline

    ultimak

    I found out a way to use bInfo and bPermissions to be able to give individual players colored names (Its a bit of a work around) but it seems as though when a player changes a group they retain their old prefix until the server is restarted. I am just curious if their is anyway for prefixs to change without a server restart, possibly by adding a /binfo reload command? Besides that the plugin works great!
     
    fneyret likes this.
  20. Offline

    ultimak

  21. Offline

    jenks1999

    agreed but alot of plugins dont support that plugin and only work with binfo... mcStats for exmple doesnt read groups from permissions, which might be more useful if it could, as i dont have a clue how to create the groups with this...
     
  22. Offline

    Winner1

    Am I the only one getting this error?

    2011-09-18 15:06:32 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:32 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:37 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:37 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:42 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:42 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:47 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:47 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:52 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:52 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:57 [INFO] bInfo is installed! Please uninstall it for bPermissions to work correctly!
    2011-09-18 15:06:57 [SEVERE] bInfo is installed! Please uninstall it for bPermissions to work correctly!
     
  23. Offline

    50l3r

    no, i have the same problem ¬¬
     
  24. Offline

    jeremaier

    I have the same problem. Please correct this.
     
  25. Offline

    Lama_0

    bInfo is not needed anymore whoever is having that problem. bPermissions now allows the prefixes and suffixes to be riht in that plugin. so for a permission node it would like something like
    groups:
    Admin:
    - *
    - prefix.0.admin
    and if you wanted color, you would do %COLORHERE% before the text, like
    groups:
    Admin:
    - *
    - prefix.0.%RED%Admin
     
  26. Offline

    godsyn

    Ever figure it out? I'm currently using mcstats3, permissionsbukkit, and binfo, but no group data is shown on mcstats. bInfo just creates a file called " playerInfo.yml" containing "{}". There is no mention as to what to do, above, and no default config.yml with examples is created.

    Update @jenks1999 : got it working.
    (note: mcstats3 reads the "prefix")
    example playerInfo.yml (needs to be stated above):
    Code:
    #Example playerInfo.yml
    administrators:
        prefix: Admin
        suffix: ''
        node: jchat.prefix.administrators
    moderators:
        prefix: moderators
        suffix: ''
        node: jchat.prefix.moderators
    donators:
        prefix: donators
        suffix: ''
        node: jchat.prefix.donators
    
    
    Will show "Admin" in mcstats3, providing the user has the "jchat.prefix.administrators" node.
     
  27. Offline

    godsyn

    It only seems to catch the group 1/2 the time...
     
  28. Offline

    md_5

    @codename_B
    As you know this is now inactive due to not being maintained if it is on Bukkitdev or you wish to revive it tag me.
     

Share This Page