MailMe API

Jun 9, 2021 at 8:21 AM
MailMe API
  • MailMe Permissions

    Number of Mailboxes a player can own = "mailbox.limit.2";
    Using a mailbox = "mailbox.use";
    Mailbox help command = "mailbox.help";
    Ability to add a mailbox = "mailbox.add";
    Ability to remove a mailbox = "mailbox.remove";
    Finds nearby mailboxes = "mailbox.find";
    Remove all player's mailboxes = "mailbox.removeall";
    Mail help command = "mailme.help";
    Permission to compose mail = "mailme.compose";
    Permission to read mail = "mailme.inbox";
    Permission to reply to mail = "mailme.reply";
    Permission to read mail as text = "mailme.read-as-text";
    Permission to send items = "mailme.send.item";
    Permission to send letters = "mailme.send.letter";
    Permission to send books = "mailme.send.book";
    Permission to see & send console commands = "mailme.send.console";
    Permission to edit user language = "mailme.lang";
    Permission to edit notification settings = "mailme.notify";
    Ability to use postoffice = "postoffice.use";
    Ability to send a mail anonymously = "mailme.send-anonymously";
    All typical admin commands = "mailme.admin";

    Adding your own language

    To add your own language, simply create another .yml e.g customlang.yml and copy the contents of an existing language file inside and translate to your desired language. Note 'T' is the token that players will input e.g /mailme lang <token>

    MailMe API

    Gradle

    Code (Text):
    repositories {
        maven { url = 'https://jitpack.io' }
    }

    dependencies {
        compileOnly 'com.github.harry0198:MailMe:master-SNAPSHOT'
    }
    Maven
    Code (Text):
    <repositories>
            <repository>
                <id>jitpack.io</id>
                <url>https://jitpack.io</url>
            </repository>
    </repositories>
       
    <dependency>
            <groupId>com.github.harry0198</groupId>
            <artifactId>MailMe</artifactId>
            <version>master-SNAPSHOT</version>
            <scope>provided</scope>
    </dependency>
    Getting an Instance
    Code (Text):
    Plugin plugin = getServer().getPluginManager().getPlugin("MailMe");
    if (plugin != null && plugin.isEnabled()) {
        # Older versions may not actually have the API interface. You should check it's installed.
        if (plugin instanceof MailMeAPI) {
            MailMeAPI api = (MailMeAPI) plugin;
        }
    }
  • Loading...
  • Loading...