DisplayShops BanSystem IntegrationAPI 1.0.0

Integrate support for DisplayShop in your BanSystem, to allow users to use DisplayShops while muted.

  1. JoeyPlayzTV
    Native Minecraft Version:
    1.15
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Contributors:
    XZot1K
    This plug-in enables developers to integrate support for DisplayShops into their BanSystem. DisplayShops uses chat input to make settings. The problem is, however, that if a player is muted, he can no longer use DisplayShops because he cannot write anything in the chat.

    This plugin consists of 2 parts. Once a BungeeCord API and a Spigot addon. The BungeeAPI allows you to check whether a player has just been asked to enter something by DisplayShops.

    You can buy DisplayShops here: https://www.spigotmc.org/resources/•-1-16-ready-•-display-shops-•-a-new-approach-to-player-shops-•.69766/

    For developers:
    Integrating DisplayShops support is easy.
    Code (Java):
    @EventHandler
        public void onChat(ChatEvent event) {
            if(event.getSender() instanceof ProxiedPlayer) {
                ProxiedPlayer player = (ProxiedPlayer) event.getSender();
                if(DSMuteFixAPI.getAPI().isInput(player)) return;
                //isInput() will return true, if the player interacts with DisplayShops chat.
             
                //Run your code here for the muted player.
            }
        }
    API Methods:
    isInput() - Returns whether the player is currently interacting with DisplayShops.
    setImmune() - Sets the player immune for DisplayShop interactions.
    removeImmune() - Removes the immune status for the player.

    For users:
    If your BanSystem already supports DisplayShops, simple drop this jar in your spigots server on which DisplayShops is installed. If your BanSystem does not support DisplayShops, ask the developer if he can add support by using this API.



    * Support *
    If you need help, write me a PM
    The reviews are not the place to report bugs or issues.

    If you like this resource, leave me a positive rating.
    XZot1K likes this.