[API] SettingsAPI 1.1

Get some settings of player's client!

  1. Aquaatic
    This API allows you to get the following settings of a player:
    1. Locale
    2. Chat colors enabled
    3. Chat visibility
    4. Render distance
    5. Resourcepack URL
    6. Resourcepack Status
    It's actually pretty simple to use:
    Code (Text):
    Settings settings = SettingsAPI.getSettings(Player)
    With the settings object you can get the settings of your player:
    Code (Text):
    Settings setting = SettingsAPI.getSettings(Player);
    String locale = setting.getLanguage();
    boolean chatColors = setting.chatColorsEnabled();
    ChatVisibility chatVisibility = setting.getChatVisibility();
    int renderDistance = setting.getRenderDistance();
    String resourceURL = setting.getRecourcePackURL();
    ResourcePackStatus resourceStatus = setting.getResourcePackStatus();
    And there are also some Events:
    1. ChatColorToggledEvent
    2. ChatVisibilityChangedEvent
    3. LanguageChangeEvent
    4. OneSettingChangedEvent
    5. RenderDistanceChangedEvent
    6. ResourcePackStatusEvent
    7. ResourcePackUrlChangeEvent
    8. SettingChangeEvent
    How to use them (example):
    Code (Text):
    @EventHandler
        public void onChange(ChatColorToggledEvent e) {
            boolean newVisibility = getSettings(e.getPlayer()).chatColorsEnabled();
            e.getPlayer().sendMessage("§7You toggled §3Chat-Colors§7! They are now §3" +
                    ((newVisibility) ? "on" : "off" + "§7!"));
        }
    And the best thing is: it's completely version-indepent!

Recent Updates

  1. Added Events

Recent Reviews

  1. Tomsie1
    Tomsie1
    5/5,
    Version: 1.1
    Simple, Good and Useable :D