PEX %<custom> API help

Discussion in 'Plugin Development' started by thebmanswan541, Nov 17, 2014.

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

    thebmanswan541

    Hello.
    I have a simple request for the people that know the pex api, I would like to know how to create my own custom prefix and adding it to permission groups, such as %prefix or %suffix, I would like a %<custom> with my own string I created. Here is an example of what I would want it:
    (in permissions.yml in PEX)
    Code:
    message-format: &7%<custom>&8%prefix%player&2 >> &a %message
    If anyone could provide help, it's always appreciated :)
     
  2. Offline

    Skionz

    thebmanswan541 I'm not too confident I know what exactly you want but from what I understand you could just use the String#replace() method to replace lets say "%playername" with player.getName();
     
  3. Offline

    xXMaTTHDXx

    Use this:
    Code:java
    1. getConfig().getString("message.format").replace("%prefix", prefix).replace("%player", playerVarible);
     
Thread Status:
Not open for further replies.

Share This Page