Pex Suffix Removal

Discussion in 'Plugin Development' started by Rellac, Nov 16, 2013.

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

    Rellac

    I am implementing some Pex support in the plugin I am developing.

    One of the things I need from this is to be able to remove the suffix of the player.

    According to This source, the way to do this is with:
    pex user <user> suffix ""

    however, using "" just isn't working for me. I am using the line:
    Bukkit.dispatchCommand(Bukkit.getConsoleSender(), "pex user " + args[0] + " suffix """);

    Obviously, Java just doesn't like the """. I want to know if there is another way to display this for the console?

    also if anyone could tell me how I could send a message to the player "args[0]", I would appreciate it

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

    GusGold

    Last edited by a moderator: Jun 5, 2016
  3. Offline

    Rellac

    I can't seem to find exactly how to hook into pex at all? Mayhaps this is just the noob in me but google yields minimal results
     
  4. Offline

    GusGold

    Rellac
    import the pex jar into Eclipse as an external library, then you want to put it as a dependency in your plugin.yml.
    To get the pex object, go:
    Code:java
    1. Plugin pexPlugin = Bukkit.getServer().getPluginManager().getPlugin("NameOfPexPlugin");
    You may need to further cast it to the pex plugin object like
    Code:java
    1. PexPlugin pex = (PexPlugin) pexPlugin;
    2. //The object PexPlugin probably doesn't exist. Look through their api to find what it is

    Once you have this, you can go pex.someMethod();
     
    Rellac likes this.
  5. Offline

    Rellac

    nice one
    [cake]
     
  6. Offline

    GusGold

Thread Status:
Not open for further replies.

Share This Page