Suffix help

Discussion in 'Plugin Development' started by Joshuak52, Oct 21, 2014.

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

    Joshuak52

    Hello, I run a prison server and I am going to be adding a Prestige plugin. I have already created a working prestige plugin but I need some help with the prefix.

    I am using essentials chat and groupmanager

    Basically at the moment here is how chat looks like

    <[G] PlayerName> MESSAGE (Non Donor)

    <[G] PlayerName [Donor]> MESSAGE (Donor)

    I need this to work for both of these like this

    <[G] PlayerName> [Prestige 1] MESSAGE (Non Donor)

    <[G] PlayerName [Prestige 1] [Donor]> MESSAGE (Donor)

    How would I do something like this?
     
  2. Offline

    teej107

    Concatinate the "extra" suffix to the current one.
     
  3. Offline

    Joshuak52

    What do you mean?
     
  4. Offline

    teej107

    currentSuffix += addSomethingHere
     
  5. Offline

    Joshuak52

    but it could be all kinds of diffrent suffixes from when they donate, I would need to allow the donor suffix to change to there donor rank when they donate but also keep prestige suffix

    Maybe there is some way I can hook my plugin into essentials and just add in essentials config chat {PRESTIGE}? If so can someone send me a tutorial

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  6. Offline

    Joshuak52

    I still need help with, I really need this so please if you can help do so :D
     
  7. Offline

    es359

  8. Offline

    StefanXX

    this is the system I have for rankup its much easier for me.
    Code:java
    1.  
    2. PermissionUser user = PermissionsEx.getPermissionManager().getUser(sender.getName());
    3. String currentRank = user.getPrefix();
    4.  
    5.  
    6. if(currentRank.equalsIgnoreCase("&7&l[&5&lPRESTIGEC&7&l]&2")){
    7. RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
    8. Economy econ = rsp.getProvider();
    9. EconomyResponse r = econ.withdrawPlayer(sender.getName(), PrestigeD);
    10. if(r.transactionSuccess()){
    11. Bukkit.broadcastMessage(prefix+"§6Congradulations! "+sender.getName()+" §ais now PrestigeD!");
    12. Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "pex user "+sender.getName()+" group set prestiged");
    13. }else{
    14. sender.sendMessage("§cYou don't have Enought Money to rankup right now!");
    15. }
     
Thread Status:
Not open for further replies.

Share This Page