How I get username color-prefix format

Discussion in 'Plugin Development' started by MetalGearDaner, Jan 5, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    MetalGearDaner

    Hello,

    Just that, I'm developing a Custom join/quit messages plugin and I would like to know how do i get the users prefix-suffix-format of the permission file of the permissions plugin of a server. Right now, my plugin broadcast the message without any usernameformat.

    Code:java
    1. public void onPlayerJoin(final PlayerJoinEvent e) {
    2. final Player p = e.getPlayer();
    3. e.setJoinMessage(p.getDisplayName()+ChatColor.YELLOW+" joined the game.");
     
  2. Offline

    xTigerRebornx

    MetalGearDaner It depends on the permissions plugin they are using. It will most likely have Vault integration, so you can hook into Vault to get the player's prefix. Check the permissions plugin's page for it
     
  3. Offline

    BungeeTheCookie

    Wonder what would happen if maybe, just maybe, the permissions plugin he was using didn't have Vault integration... > : D
     
  4. Offline

    xTigerRebornx

    BungeeTheCookie They'd have to hook into that permissions plugin itself, and get the groups from it. That, or suggest that the Plugin Developer make it have Vault integration XD
     
  5. Offline

    BungeeTheCookie

    I would much rather force the developer to make it have Vault Integration. Here is how to do so.

    IMPLEMENT VAULT OR DIE!!!!!!
     
  6. Offline

    xXMaTTHDXx

    Depending on your permissions plugin, I use permissionsEx and I hooked into that and essentials, they both have custom methods to get the players nickname, prefix and suffix.
     
Thread Status:
Not open for further replies.

Share This Page