InfinitySnap 1.0.0

The hardest choices require the strongest wills.

  1. AppleNick
    Tested Minecraft Versions:
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    https://github.com/applenick/InfinitySnap
    [​IMG]
    Inspired by Avengers Infinity War, this fun plugin allows you to “perfectly balance” your server with just a /snap of your fingers.

    Once a snap is initiated players will be chosen at random, and depending on the snap type will perform a related action. Currently the “snapper” has the choice to perform one of three snap types.

    [​IMG]
    • 3 Snap Types
      • Broadcast: Will display a configurable message to the server
      • Kick: Kicks the player from the server with a configurable quit screen message
      • Ban: Same as Kick, but adds the player to a “souls” list which makes them unable to rejoin until cleared.
    • All messages are 100% configurable
    • Optional Player Effect to to stimulate being snapped.
    • Support for Minecraft 1.9 -> 1.13+
    [​IMG]
    • /snap (players) - Performs the default snap type set in the config.
    • /snap broadcast (players) - Broadcasts selected players with a configurable message.
    • /snap kick (players) - Kicks selected players and sends a configurable message to the kick screen.
    • /snap ban (players) - Performs the same action as /snap kick, but players who are selected will also be placed on the souls.txt file. So they will be unable to join the server until their name is removed.
    • /souls - Displays a list of players who have been snapped and are unable to join.
    • /souls add (name) - Adds the specified name to the souls
    • /souls remove (name) - Removes the specified username from the souls.txt file
    • /souls clear - Will clear the entire souls.txt file.
    NOTE: The (players) argument is optional, if you provide players for the snap commands the provided players will be the only ones affected.

    Examples:
    Ex 1. Kicking half the server
    Code (Text):
    /snap kick
    Ex 2. Kicking 2 out of 4 players
    Code (Text):
    /snap kick Player1 Player2 Player3 Player4
    Out of the 4 players provided, two will randomly be chosen.

    [​IMG]
    Access to /snap:
    Code (Text):
    snap.command
    Access to /souls:
    Code (Text):
    soul.command
    Any player who has this permission will never be included in the /snap:
    Code (Text):
    snap.ignore
    [​IMG]
    Simply drop the plugin inside your plugins folder, and everything should work after reloading or restarting your server.

    The souls.txt file can be found inside of the data folder for InfinitySnap.
    Usually located at
    Code (Text):
    /plugins/InfinitySnap/souls.txt
    [​IMG]
    Code (Text):

    snap:
    #Delay in SECONDS between the snap action for each player. Set to 0 for no delay.
      delay: 1

      #The default snap type will be the type of snap that is used when using /snap with no arguments.
      #You can always specify /snap [type] when using the command in-game.
      #Snap Types:
      #  1. Message: Will send a configurable message to all those chosen
      #  2. Kick: Will kick all selected players with a delay and message
      #  3. Ban: Will kick each player then disallow them from reconnecting, banned names will be found in the souls.txt file.
      default-type: message

      #When true, the souls.txt file will be saved as soon as any change is made to the list.
      #This will result in some minor performance decrease, but in exchange for ensuring no changes are lost in case of a server crash.
      #Set to false to only save on plugin shutdown.
      instant-save: true

      #Plays an effect before the snap occurs. When a player is snapped a cool effect will be played
      # around them to stimulate them being snapped. After the effect is complete the main snap action
      # will be completed (such as kicking the player).
      effect-enabled: true

      #When true, will hide "left server" message for each snapped player.
      hide-leave-message: true

      #When true, any player with the permission "snap.ignore" or OP will be spared from all snap selections.
      allow-ignore-perms: true

      #This is the configurable message sent to the command sender of /snap after the snap has been completed.
      # VARIABLES:
      # '%snapped%' - When placed in message will display the # of players who were snapped.
      # '%total' - When placed in message will display the total # of players before the snap.
      #
      final-message: "&tPerfectly Balanced &7- (&b%snapped% &7/ &3%total%&7)"

      # Messages from this list will be chosen at random and sent to the command sender as they perform /snap
      # NOTE: you can use &t to display a randomly chosen chat color.
      snap-quotes:
        - "&tFun isn’t something one considers when balancing a server. But this... does put a smile on my face."
        - "&tThe hardest choices require the strongest wills."
        - "&tFine, I'll do it myself."

    ###############################################################################################                                                                                      
    # Messages
    ###############################################################################################                                                                                          
    snap-ban:
      #This message will be sent to players who are snapped with the ban type snap.
      ban-message: "&cYou have been snapped!"

    snap-kick:
      #This message will be sent to players who are snapped with the kick type snap.
      kick-message: "&cYou have been snapped!"
     
    snap-message:
      #This message will be broadcast to players who are selected for the message type snap.
      broadcast-message: "&t%player% &6has been snapped!"
     
    Preview:


    Planned Features (Coming Soon):
    If you have any ideas, I am always open to adding features. Please don’t hesitate to make a suggestion.
    • Command Snap: On each snap, a specific command will be executed per player.
    • More effect types
    Evan52098 and Woobie like this.