FamedPanic 0.0.1

Provides a way for famous members of your server to escape cheaters!

  1. MachoPiggies
    Native Minecraft Version:
    Legacy (< 1.13)
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    Source Code:
    https://github.com/MachoPiggies/FamedPanic
    DISCLAIMER (BUNGEECORD)
    The way this plugin communicates with other servers when you are running a bungee network uses something called the Bungee Messaging Channel. This means that there is no need for a proxy plugin and so you need to put a copy of this plugin on every server you have on the network.

    A proxy plugin meant only for bungee servers is incoming but not currently available. Because of the resources needed to test this method of communication between servers, I have not been able to fully check that server-to-server communication works properly. What the bungee functionality is supposed to do, is send the panic alerts to every player on a network with the proper permissions and for those on a different server, it include a message for teleporting to the correct one. If this fails, causes an error, doesn't look right on your servers, please send me a DM right away and I can push out a patch.

    ABOUT
    FamedPanic is an easy-to-use, method of protecting your content creators or high donators from cheaters or areas where an unfair exploit has been abused to ruin gameplay. The way FamedPanic works is by completely freezing a player and contacting staff through a configurable ingame message and optional Discord/Slack embeds through webhooks!

    This plugin was made to be configurable which means for the most part, this plugin is completely configurable with every embed, message, prefix and link being configurable to the point where the plugin can be made to look completely custom.

    This plugin also has an API, although use of this is not encouraged for those only looking for if a player is in panic mode, rather you can check the entities metadata as the plugin adds the "panicking" tag to panicking players, and the "panicinspector" tag to those in the inspector mode. More information on the API will be listed below.

    DISCORD & SLACK INTEGRATION
    One of FamedPanic's proudest functions is its ability to send embed or normal messages to both Discord and Slack. By default, these 2 functions are disabled as they need what is called a 'webhook'. Please use the below guides to generate webhooks for the plugin.

    Discord: Follow 'Making a webhook' here
    Slack:
    Follow steps 1 to 3 here

    You need to start your server with the plugin to generate the config files to proceed to the next step.

    Once the config files have been generated, you should find that in the config folder of FamedPanic (/plugins/FamedPanic), then a folder called 'auth.yml' (/plugins/FamedPanic/auth.yml), this file is where you can enable/disable integrations and control some aspects of them.

    You will then find a folder called 'embeds' (/plugins/FamedPanic/embeds) has been created, enter that file and you will find 4 files. They are all JSON files, which means they are a little bit like YAML/YML files, just a little bit more tricky to use. To understand what they apply to, it goes by 'PlatformAction', 'Platform' being either Discord or Slack, and 'Action' being either Enter or Leave which equates to if a player is entering or leaving panic mode.

    Each of the files have placeholders, some which can be controlled through the 'auth.yml' folder, they are below.

    • {%PLAYER_NAME%} - Panicking players name
    • {%PLAYER_UUID%} - Panicking players UUID
    • {%PLAYER_DISPLAYNAME%} - Panicking players displayname (how it shows in the playerlist)
    • {%PLAYER_FACE%} - A png link to the players avatar face
    • {%VOLATILE_BUNGEE_SERVER%} - Server name that the player went into/left panic on (if bungee not enabled, this will be invisible)
    • {%VOLATILE_BUNGEE_COMMAND%} - Server command (i.e /server ServerName) that the player went into/left panic on (if bungee not enabled, this will be invisible)
    • {%TIMESTAMP%} - Timestamp of when the player went into/left panic mode
    • {%SERVER_IMAGE%} - Server image png which can be set in /plugins/FamedPanic/design/server-data.yml
    • {%SERVER_NAME%} - Server name which can be set in /plugins/FamedPanic/design/server-data.yml
    • {%BUNGEE_SERVER_NAME%} - Server name that the player went into/left panic on
    • {%BUNGEE_SERVER_COMMAND%} - Server command (i.e /server ServerName) that the player went into/left panic on
    • {%TIME%} - Time the player went into/left panic mode
    • {%WORLD%} - The world the player went into/left panic mode
    • {%LOCATION_X%} - The x coordinate the player went into/left panic mode
    • {%LOCATION_Y%} - The y coordinate the player went into/left panic mode
    • {%LOCATION_Z%} - The z coordinate the player went into/left panic mode
    To create your own embeds, I recommend using the below web applications that will allow you to design it and take the JSON which will work in the 4 files.

    Discord: DiscoHook
    Slack: Slack BlockKit Builder

    [​IMG] [​IMG] [​IMG] [​IMG]

    Preview


    Inspector Mode (BETA)
    The inspector mode is a system in beta which allows staff to go into spectator mode around the panicking player through a command or clicking the message on the alert if enabled in the config. Due to its status of being in beta, it is disabled by default, although can be enabled through the main config.yml.

    The way it works is when a player uses the command or clicks a button, if the player is still in panic mode, the player will be teleported to the player in spectator mode and the plugin will force the player to use your servers vanish command (can be configured in config.yml). Another option on this mode is alerting the player panicking when a staff member has gone into inspector mode on them.

    When the player leaves panic mode, or it is cancelled manually, the players in inspector mode are kicked out of the inspector mode and are sent back to the position they were before going into the inspector and regain their correct speed, flight settings, gamemode etc.

    COMMANDS & PERMISSIONS
    /panic (famedpanic.panic) - Sends a player into panic mode
    /panicking <player> (famedpanic.panicking) - Checks to see if a player is in panic mode
    /cancelpanic <player> (famedpanic.panic.cancel) - This is a command for staff to manually remove players panic mode status
    /paniccooldown <player> [set/add/remove] [seconds] (famedpanic.cooldown) - This command allows staff to set a cooldown to when a player can next use the panic command. Note that this command does have an interactive UI (if the setting hasn't been disabled in config.yml), and as such, you should just be able to use /paniccooldown <player>

    /panicreset [player] (famedpanic.resetplayer) - This command is used as a last resort for if a fatal error occurs with lifting panic mode. It will remove all effects panic mode has on a player. Do NOT use this if you haven't tried a player sudo or /cancelpanic

    /panicinspector <player> (famedpanic.inspector) - Sends the caster into the inspector mode targetted at the given player
    /panicinspectorreset [player] (famedpanic.inspector [famedpanic.inspector.resetothers if they are able to reset other people]) - This is the inspector equivalent of /panicreset. This command is a little more detrimental as it is dealing with gamemodes and teleporting players. It should still only be used as a last resort

    /panicsafemode [on/off] (famedpanic.safemode [famedpanic.safemode.configure if they are able to change the safemode status]) - When safemode is enabled, players going into/leaving panic mode will not send embeds to Discord/Slack

    Miscellaneous Permissions
    famedpanic.panic.cooldown.bypass - Allows a player on panic cooldown to ignore it and go into panic mode anyway
    famedpanic.alerts.receive - Sends an alert to the player when a player goes into/leaves panic mode

    API (For Developers) - Click Here
    Yes! This simple plugin has an API believe it or not. As aforementioned, if you are only looking to see if a player is in panic or inspector mode, you can use either if the following:

    Code (Java):
    if (player.hasMetadata("panicking")) {
        //code
    }
    Code (Java):
    if (player.hasMetadata("panicinspector")) {
        //code
    }
    If you are going to be making a resource that requires you to be up to date with the API, then it's recommended that you join this Discord server and subscribe to the #famedpanic-api channel.

    CONFIGURATION
    Due to limitations of what can be provided by YAML and Spigot, only the config.yml is able to have pre-written comments to help with setup, for that I apologise. This is what this section is for.

    Default confuration of the config.yml can be viewed here.

    Code (YAML):

    slack
    :
      block
    :
        blockAltEnter
    : '@channel {%PLAYER_NAME%} has activated panic mode! Please see
          to this immediately.' # If useBlock is false, this will be sent instead
        blockAltLeave
    : '{%PLAYER_NAME%} has deactivated panic mode!' # If useBlock is false, this will be sent instead
        useBlock
    : true # Controls whether a block or text is sent
      webhookURL
    : '' # Webhook token of Slack application
      enabled
    : false # When false, Slack integration will not be used
    discord
    :
      enabled
    : false # When false, Disocrd integration will not be used
      webhookURL
    : '' # Webhook token of Discord application
      embed
    :
        useEmbed
    : true # Controls whether an embed or text it sent
        color
    : '13828351' # Color of the left side of the embed, this can take a HEX value (e.g #ff0000)
        embedAltLeave
    : '{%PLAYER_NAME%} has deactivated panic mode!' # If useEmbed is false, this will be sent instead
        embedAltEnter
    : '@everyone {%PLAYER_NAME%} has activated panic mode! Please see
          to this immediately.' # If useEmbed is false, this will be sent instead

     

    This is self explanatory, it's the message configuration for the plugin.
    Code (YAML):
    general:
      safemode
    :
        'off'
    : '{%PREFIX%}&7Safemode is turned &coff&7!'
        toggle-off
    : '{%PREFIX%}&7Safemode turned &coff&7!'
        toggle-on
    : '{%PREFIX%}&7Safemode turned &aon&7!'
        'on'
    : '{%PREFIX%}&7Safemode is turned &aon&7!'
      prefix
    : '&f[&cPanic&f] &r'
      permission-denied
    : '{%PREFIX%}&cYou do not have permission to do this!'
      emergency-prefix
    : '&b&kAA&r &c&lPANIC > '
      missing-arg
    :
        player
    : '{%PREFIX%}&7Please specify a valid player!'
    protections
    :
      no-chat
    : '{%PREFIX%}&7You cannot chat whilst in panic mode!'
      interact
    :
        worldinteract
    :
          no-block-break
    : '{%PREFIX%}&7You cannot break blocks whilst in panic mode!'
          no-vehicle-use
    : '{%PREFIX%}&7You cannot interact with this vehicle whilst in
            panic mode!'
          no-block-place
    : '{%PREFIX%}&7You cannot place blocks whilst in panic mode!'
        no-drop
    : '{%PREFIX%}&7You cannot drop items whilst in panic mode!'
        no-open
    : '{%PREFIX%}&7You cannot open containers whilst in panic mode!'
        misc
    : '{%PREFIX%}&7You cannot interact with this whilst in panic mode!'
      no-command
    : '{%PREFIX%}&7You cannot use that command whilst in panic mode!'
      combat
    :
        no-damagee
    : '{%PREFIX%}&7You cannot attack &c{%TARGET_NAME%} &7whilst they are
          in panic mode!'
        no-damager
    : '{%PREFIX%}&7You cannot damage players whilst in panic mode!'
    alerts
    :
      inspector-arrival
    : '{%PREFIX%}&7A staff member has arrived!'
      disabled
    : '{%PREFIX%}&7You have left panic mode.'
      enabled
    : '{%PREFIX%}&7You have entered panic mode! Staff have been alerted and will
        be with you momentarily.'
      inspector-leave
    : '{%PREFIX%}&7You have left panic inspector mode!'
      on-cooldown
    : '{%PREFIX%}&7You cannot go on panic mode for another &c{%COOLDOWN_EXPIRE%}&7!'
      inspector-mode-disabled
    : '{%PREFIX%}&7The panic inspector is not enabled on this
        server!'
      inspector-kick
    : '{%PREFIX%}&c{%TARGET_NAME%} &7has left panic mode. You will be
        removed from inspector mode in &c{%INSPECTOR_KICK_DELAY%}&7!'
      announce-enter-inspectorclick
    : '&6&lCLICK TO TELEPORT!'
      announce-enter-inspectorclick-hover
    : '&6You will enter inspector mode!'
      inspector-enter
    : '{%PREFIX%}&7You have entered panic inspector mode! Please note
        that this system is in beta and we expect bugs, if you come across anything you
        believe is an issue to do with this mode, please report it to your serer owner/admin!'
      announce-enter
    : '{%EMERGENCY_PREFIX%}&c{%PLAYER_DISPLAYNAME%} &ehas activated panic
        mode! Please investigate immediately.'
      enabled-safemode
    : '{%PREFIX%}&7You have entered panic mode! The system is in safemode,
        this means staff have NOT been notified externally, you may need to direct message
        a staff member instead of waiting.'
      announce-leave
    : '{%EMERGENCY_PREFIX%}&c{%PLAYER_DISPLAYNAME%} &eis no longer in
        panic mode!'
      spec-whilst-panic
    : '{%PREFIX%}&7You cannot go into inspector mode whilst in panic
        mode!'
      reset-success
    : '{%PREFIX%}&7Successfully reset speed!'
      staff-disabled
    : '{%PREFIX%}&7A staff member has turned off your panic mode!'
      panic-whilst-spec
    : '{%PREFIX%}&7You cannot go into panic mode whilst in inspector
        mode!'
      forced-out
    : '{%PREFIX%}&7The plugin is reloading/disabling, you have been forced
        out of the mode you were in!'
      cooldown-add
    : '{%PREFIX%}&7You are on panic cooldown for &c{%COOLDOWN_EXPIRE%}&7!'
      cooldown-expire
    : '{%PREFIX%}&7You can use panic again!'
      in-panic-mode
    : '{%PREFIX%}&c{%TARGET_NAME%} &7is in panic mode!'
      not-in-panic-mode
    : '{%PREFIX%}&c{%TARGET_NAME%} &7 is not in panic mode!'
    commands
    :
      cancelpanic
    :
        notpanicking
    : '{%PREFIX%}&c{%TARGET_NAME%} &7is not in panic mode!'
        success
    : '{%PREFIX%}&7Successfully cancelled &c{%TARGET_NAME%}&7''s panic status!'
      cooldown
    :
        nogui
    :
          set
    : '{%PREFIX%}&c{%TARGET_NAME%} &7is now on cooldown for &c{%DURATION%}&7!'
          unknown
    : '{%PREFIX%}&7Unknown opereation ''&c{%OPERATION%}&7'', 2nd argument
            must be either set/add/remove!'
          missing
    : '{%PREFIX%}&7Missing operation, please select either set/add/remove!'
          remove
    : '{%PREFIX%}&c{%TARGET_NAME%}&7''s cooldown has been removed!'
      parsing
    :
        invalid-number
    : '{%PREFIX%}&7You did not specify a valid number!'

    This is for configuring your server details which are shown on some embeds.
    Code (YAML):
    server:
      name
    : Minecraft Server
      image
    : https://static.planetminecraft.com/files/resource_media/screenshot/1606/photo9868183_lrg.jpg
     

    SETUP
    Single Spigot Server Use
    If you are running one server, then you can just put the plugin in your plugins folder and start your server. It's recommended that you do a server restart instead of a reload, although no large scale issues have been found when loading it like this. After first load, all config files should have created themselves for which you can then edit.

    Multiple Interconnected Spigot Server Use
    If you are running multiple servers, probably through bungeecord, then you need to place the plugin on every server and make the config the same. It should communicate between servers without further action. In future, I do have a vision to create a bungeecord version of this plugin which will only need to be put on the proxy server.

    OTHER
    If your plugin has reported an error and has told you to report it to the plugin developer, send me a DM or add me on Discord through the social links below, or directly @ MachoPiggies#3484.

    FamedPanic Discord: https://discord.gg/HR7EuUWkU4 (Not meant to be a huge Discord, only meant for assistance with my plugins)
    Other Contact Methods: machopiggies.com

Recent Reviews

  1. ReyBot
    ReyBot
    5/5,
    Version: 0.0.1
    It was a very well-developed plugin. I had my developers look over the source code and it's very clean and organized (according to them).

    Overall, the plugin offers features that many other panic plugins do not have.

    5 star for you, young man.