Hugs 2.0.5

Spread the love.

  1. ShadowMasterG23
    Tested Minecraft Versions:
    • 1.11
    • 1.12
    • 1.13
    [​IMG]
    This is a simple plugin that I originally made for my friends but has now turned into more of a hobby. Anyways, they updated their server to 1.11 and their previous Hugs plugin didn't work anymore because there wasn't an update for it. Since it wasn't updated, they looked for a replacement but those were also outdated or they were abandoned. I didn't know how to update the one they had, but I thought that it should be easy enough to replicate. I was both right and wrong. Anyways, I realized that since most other emotion-based plugins are outdated I would share it here so that everyone would have an updated version to use. I hope that you enjoy.​

    [​IMG]
    • Customizable messages.
      • Message that you receive and the recipient receives.
      • Title and Subtitle that the recipient receives.
        • A configurable option to enable/disable it.
      • Server broadcast message.
        • A configurable option to enable/disable it.
      • Player cannot be found message.
      • Insufficient permissions message.
      • Invalid arguments message.
      • Too many arguments message.
      • Reload command message.
      • Cooldown message.
      • Total hugs given message.
      • Player profile message.
    • Clickable commands.
    • Customizable particles & sounds.
    • Two configurable options to restore player's health & hunger.
    • Verbose output. (Console & File)
      • Logs information such as who reloaded the config, who gave who a hug etc, to the console.
      • Shows configuration options upon reload.
      • Warns the user if some configuration settings are invalid.
    • Configurable cooldowns.
    • A built-in reload command to update the config without having to restart the server.
    • An option to change the name of the console.
    • A special message when you hug the developer.
    • An option to give players a reward for hugging the developer.
    • The plugin's help page will tell you whether or not you have permission to use a command.
    • A manual updater.
    If you want more detailed information about each update, you can read about them here.

    [​IMG]
    Here is a list of all of the registered commands that you can use. The next section has the permissions needed to use the commands!
    • /hug <player> - Give a hug to a designated player
    • /hugs - The base command for the plugin. It also shows plugin information.
    • /hugs help - Shows the help page and all the available commands.
    • /hugs total - Shows the total amount of hugs given.
    • /hugs info <player> - Shows a player's Hug stats.
    • /hugs reload - Reloads the config.yml

    [​IMG]
    Here are all of the permissions you can give to your players or just keep to yourself. This list is here so that if you want players or perhaps one of your server ranks to be able to use these commands, they will be able to if they have them. Plus, you know, it's here for reference too.
    • hugs.hug - Grants the permission to use /hug <player>
    • hugs.hug.everyone - Grants the permission to use /hug *
    • hugs.bypass.normal - Grants the permission to bypass normal hug cooldowns.
    • hugs.bypass.mass - Grants the permission to bypass mass hug cooldowns.
    • hugs.use - Grants the permission to use /hugs and /hugs help
    • hugs.total - Grants the permission to use /hugs total
    • hugs.info - Grants the permission to use /hugs info <player>
    • hugs.update - Allows non-operators to receive the message for plugin updates.
    • hugs.reload - Grants the permission to use /hugs reload
    By default, OPs have all of these permissions.

    [​IMG]
    This plugin requires that you give players permission to use the commands because, by default, no one has access to them... except OPs. Anyways, if you wish for your players or one of your server ranks to have the ability to hug people, then you will need to have a permissions manager. So here are some permission plugins that you could use.
    • LuckPerms
    • zPermissions
    • PermissionsEx
    • bPermissions
    • GroupManager
    Don't let that list limit you. Those are just some examples and you can use whatever permission plugin you desire, but make certain that you have one.

    [​IMG]
    Modern Console Design and user-friendly information
    [​IMG]
    Next Page functionality
    [​IMG]
    Clickable commands
    [​IMG]
    The indicator that you have permission to use a command.
    [​IMG]
    [​IMG]
    What receiving a hug looks like.
    [​IMG]
    More screenshots will come later down the line.

    [​IMG]
    The plugin has PlaceholderAPI placeholders! To take advantage of these placeholders, simply use any plugin that supports PlaceholderAPI and use one of the placeholders listed below.

    Available Placeholders:
    • %hugs_total%: Grabs the total amount of hugs given.
    • %hugs_player_total_given%: Grabs the player's total amount of hugs given.
    • %hugs_player_total_received%: Grabs the player's total amount of hugs received.
    • %hugs_player_total_mass_given%: Grabs the player's total amount of mass hugs given.
    • %hugs_player_total_mass_received%: Grabs the player's total amount of mass hugs received.
    You can download PlaceholderAPI here.

    NOTE: The Hugs Plugin does not support the PlaceholderAPI library. This means that you cannot use other plugins placeholders in this plugin's config!

    [​IMG]
    There are two methods you can use to update the plugin. Either one will work, but it's your decision on which method to use.

    Method 1:
    1. Stop your server & put the Hugs (v2.0).jar file in your server's /plugins/ directory
    2. Start the server (The plugin will generate all necessary files)
    3. Edit the config.yml with your desired settings. (Remember to save it!)
    4. Edit the messages.yml with your desired messages. (Remember to save it!)
    5. Type "/hugs reload" on the server
    6. Done!
    Method 2:
    1. If you have Plugman, put the Hugs (v2.0).jar file in your server's /plugins/ directory
    2. Type "/plugman load Hugs" in-game
    3. Edit the config.yml with your desired settings. (Remember to save it!)
    4. Edit the messages.yml with your desired messages. (Remember to save it!)
    5. Type "/hugs reload" on the server
    6. Enjoy!
    If you don't have Plugman or don't know what Plugman is, you can download/find out more information about it here.

    NOTE: If this is NOT your first time downloading this plugin, make sure to delete the Hugs folder in your /plugins/ directory. All updates have changed the config.yml and if you don't delete the old config, then the plugin won't work properly.

    [​IMG]
    There are three files for this plugin. The config.yml, messages.yml, and data.yml. The config.yml is simple to use, just change the default settings to whatever you want and save the file. The same can be said for the messages.yml. Then type /hugs reload on the server and you're done. As for the data.yml, I recommend that you leave it be. Even though you can try and change it, it's just there to serve the purpose of counting hugs.

    NOTE: With most plugins, if you reload a plugin using the built-in commands and you go back to the config.yml, a popup will appear saying that the config has been reloaded, do you wish to keep this in the editor. However, this is not the case with the Hugs plugin. The Hugs plugin is essentially in read-only mode, meaning that nothing is being written to the config.yml or messages.yml. So, if you make changes to the files and use the reload command, just know that it works and you can verify that by giving a hug. However, if you were to have the data.yml file open and someone gave someone else a hug and you went back to the data.yml, then the popup will appear because information is being written to the data.yml file.
    Code (Text):
    #
    # Hugs - Developed by ShadowMasterGaming
    #

    # Enable update checking?
    check_for_updates: true

    # What language is native to your server?
    language_file: en_US

    # The method of storing plugin data.
    # Valid settings include: yaml, yml, & MySQL.
    # If an invalid storage setting is detected, the plugin will default to YAML files.
    storage: yaml

    #
    # Normal Plugin Settings
    #
    settings:
      # Force the usage of exact names when using the /hug command. Only applies to the /hug command.
      force_exact_names: true

      # Allow players to give themselves hugs?
      allow_self_hugging: true

      # Allow self hugs to count towards player data?
      allow_self_hug_playerdata: true

      # Allow players to give hugs by shift right clicking a player?
      allow_shift_hugging: true

      # Upon receiving a hug, restore the receiver's health back to 100%?
      restore_player_health: false

      # Upon receiving a hug, restore the receiver's hunger back to 100%?
      restore_player_hunger: false

      # Hug Message Settings
      hug_messages:
        enabled: true

      # Broadcast Settings
      broadcasts:
        normal_hugs: true
        mass_hugs: true
        self_hugs: true

      # Title Settings
      titles:
        enabled: true
        # The interval settings for how titles appear. (In Seconds)
        fade-in: 1
        stay: 5
        fade-out: 1

      # The particle effect that will spawn around the receiver when they receive a hug.
      # If the particle effect is invalid, you will receive a warning in the console. It won't break the plugin.
      # This link will take you to a page with all of the available particle effects you can use: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html
      particles:
        enabled: true
        effect: HEART
        # Allow for other players to see the particles?
        # The particles will be spawned at the receiver's location and anyone nearby will be able to see them.
        global: false

      # The sound effect that will play at the receiver's location when they receive a hug.
      # If the sound effect is invalid, you will receive a warning in the console. It won't break the plugin.
      # This link will take you to a page with all of the available sound effects you can use: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
      sounds:
        enabled: true
        sound: ENTITY_CAT_PURR
        volume: 1
        pitch: 1
        # Allow for other players to hear the sounds?
        # The sound will be played at the receiver's location and anyone nearby will be able to hear it.
        global: false

      # Cooldown Settings
      cooldowns:
        # The cooldown between hugs. (In Seconds)
        normal_hugs: 5
        # The cooldown between mass hugs. (In Seconds)
        mass_hugs: 30
        # If set to true, the time remaining will be displayed as a decimal. (E.G. 14.3 seconds remaining.)
        use_exact_time: false

      # Settings for commands that would benefit from confirmations. (E.G. /hugs admin purge <player>)
      # If the GUI is not enabled, it will default to a text based confirmation.
      confirmations:
        enabled: true
        use_gui: true

      # Leaderboard settings.
      # If the GUI is not enabled, it will default to a text based leaderboard.
      leaderboard:
        use_gui: true

      # Players will receive one cookie when they hug the developer. :3
      developer_reward: false

    #
    # The different verbose settings that you can change. This is to help keep track of things.
    #
    verbose:
      # Settings for file logging. If enabled, all messages that would be sent to the console will be logged to a file.
      file_logging: true

      # Settings for console logging. If enabled, it will log stuff like who reloaded the config and who gave hugs.
      console:
        enabled: false
        console_name: "Console"

      # Settings for startup verbose.
      # If both settings are set to true, the plugin will default to show_all_settings.
      startup:
        enabled: false
        show_informative_settings: false
        show_all_settings: false
        show_hooks: true

      # Settings for reload verbose.
      # If both settings are set to true, the plugin will default to show_all_settings.
      reloads:
        enabled: false
        show_informative_settings: false
        show_all_settings: false

    #
    # The Experimental Settings
    #
    experimental_settings:
      # Allow the receiver to have temporary invincibility after they are hugged?
      temporary_invincibility:
        enabled: false
        effects:
          fall_damage: true
          pvp: true
        # The duration of invincibility. (In seconds)
        duration: 10

      # Deny players from harming each other?
      passive_mode:
        enabled: false
        message:
          enabled: true
          # The delay between the passive mode message being sent to the player. (In seconds)
          delay: 10

    Code (Text):
    #
    # Hugs - Developed by ShadowMasterGaming
    #

    #
    # Available Placeholders:
    #   Global: Can be used anywhere in this file. Even in places it normally shouldn't be.
    #     %prefix%
    #
    #   Case Specific: Can only be used in certain variables. Supported placeholders are listed above the variable.
    #     %sender%, %target%, %permission%, {X}, %normal_hugs_total%, %mass_hugs_total%,
    #     %total_hugs_given%, %total_hugs_received%, %total_mass_hugs_given%, %total_mass_hugs_received%,
    #     %header%, %footer%
    #

    plugin_placeholders:
      # The prefix for the plugin. Can be used globally using %prefix%.
      prefix: '&3&lHugs &8&l>>'

      # The header that is put above a message. Can be used in message lists using %header%.
      header: '&8&l<&8&m&l-------&8&l<&3+&8&l>&m&l--------&8&l<<&b&l Hugs &8&l>>&m&l--------&8&l<&3+&8&l>&m&l-------&8&l>'

      # The footer that is put below a message. Can be used in message lists using %footer%.
      footer: '&8&l<&8&m&l--------&8&l<&3+&8&l>&m&l---------&8&l<<&3+&8&l>>&m&l---------&8&l<&3+&8&l>&m&l--------&8&l>'

    messages:
      # The messages that are sent upon sending and receiving hugs.
      hug_messages:
        # The message that the sender receives upon giving a hug.
        # Supported Placeholders: %target%
        message_to_sender: '%prefix% &3You gave &7&l%target% &3a hug!'
        # The message that the target receives upon receiving a hug.
        # Supported Placeholders: %sender%
        message_to_receiver: '%prefix% &3You were hugged by &7&l%sender%&3!'
        # The message that the sender receives if they hug themself.
        # Supported Placeholders: N/A
        self_hug: "%prefix% &7You gave yourself a warm hug."

      # The title and subtitle that the target receives upon receiving a hug.
      # Only supports the %sender% placeholder in the title variable.
      title_message:
        title: '&3%sender%'
        subtitle: '&7Hugged you!'

      # The messages that are broadcasted to the server.
      broadcasts:
        # The broadcast that is shown when a player hugs another player.
        # Supported Placeholders: %sender% & %target%
        normal_hugs:
          message: '%prefix% &7&l%sender% &3hugged &7&l%target%'
        # The broadcast that is shown when a player hugs everyone.
        # Supported Placeholders: %sender%
        mass_hugs:
          message: '%prefix% &7&l%sender% &3gave everyone a hug!'
        # The broadcast that is shown when a player hugs themself.
        # Supported Placeholders: %sender%
        self_hugs:
          message: "%prefix% &7&l%sender% &3hugged themself."

      # The messages for data purges.
      confirmations:
        # Supported Placeholders: N/A
        confirmation_all_message: "%prefix% &7Are you sure? Doing this will result in all player data being deleted! \nType \"yes\" to continue or type \"no\" to cancel."
        # Supported Placeholders: %player%
        confirmation_message: "%prefix% &7Are you sure? Doing this will result in %player%'s data being deleted! \nType \"yes\" to continue or type \"no\" to cancel."
        # Supported Placeholders: N/A
        canceled_purge: "%prefix% &7Canceled data purge."
        # Supported Placeholders: N/A
        data_purged: "%prefix% &7Everyone's data was &cdeleted&7!"

      # The message that the sender receives when they use the reload command.
      # Supported Placeholders: N/A
      reload_message:
        - "%header%"
        - "%prefix% &7Configuration reloaded &asuccessfully&7."
        - "%footer%"

    #
    # Data Messages
    #
    data:
      # The messages that the sender receives when they use the /hugs total command.
      # Supported Placeholders: %normal_hugs_total% & %mass_hugs_total%
      total_hugs_message:
      - "%header%"
      - "%prefix% &3%normal_hugs_total% &7hugs have been given!"
      - "%prefix% &3%mass_hugs_total% &7mass hugs have been given!"
      - "%footer%"

      # The messages that appear when a player types /hugs info <player>.
      # Supported Placeholders: %total_hugs_given%, %total_hugs_received%, %total_mass_hugs_given%, & %total_mass_hugs_received%
      player_profile:
      - "&3&lHugs Given&7: &b%total_hugs_given%"
      - "&3&lHugs Received&7: &b%total_hugs_received%"
      - "&3&lMass Hugs Given&7: &b%total_mass_hugs_given%"
      - "&3&lMass Hugs Received&7: &b%total_mass_hugs_received%"

      # The message that the sender receives when they purge a player's data.
      # Supported Placeholders: %target%
      player_data_purged: "%prefix% &3%target%'s &7data was &cdeleted&7!"

    #
    # Error Messages
    #
    errors:
      # The message that the sender receives if the name is spelled incorrectly or if the target is offline.
      # Supported Placeholders: %target%
      player_not_found: "%prefix% &6&l%target% &7doesn't want to be hugged!"

      # The message that the sender receives if they are the only one online and try to send a mass hug.
      # Supported Placeholders: N/A
      not_enough_players: "%prefix% &c&lERROR: &7At least three players must be online in order to give a mass hug!"

      # The message that the sender receives if they try to hug themself and the "allow_self_hugging" setting is set to false.
      # Supported Placeholders: N/A
      not_allowed_self_hug: "%prefix% &c&lHmm &7well... this is awkward. It seems as if something is preventing you from hugging yourself."

      # The message that the sender receives if they type a subcommand incorrectly.
      # Supported Placeholders: N/A
      invalid_arguments: "%prefix% &7Type &b/hugs help &7for the proper usage of the commands!"

      # The message that the sender receives if they have too many arguments.
      # Supported Placeholders: N/A
      too_many_arguments: "%prefix% &c&lERROR: &7Too Many Arguments. Type &b/hugs help &7for the correct usage!"

      # The message that the sender receives if they don't have enough arguments.
      # Supported Placeholders: N/A
      too_few_arguments: "%prefix% &c&lERROR: &7Too Few Arguments. Type &b/hugs help &7for the correct usage!"

      # The message that the sender receives when they check for a player's info and the player's name is longer than 16 characters.
      # Supported Placeholders: N/A
      invalid_player: "%prefix% &c&lERROR: &7Invalid Name. Names are, at maximum, 16 characters long."

      # The message that the sender receives if they use /hugs info <player> and the receiver's data isn't found.
      # Supported Placeholders: %target%
      data_not_found: "%prefix% &c&lERROR: &7%target% has not given nor received any hugs. :'( \nWhat part about \"Spread the Love\" didn't you understand?"

      # The message that the sender receives if they do not have the correct permissions.
      # Supported Placeholders: %permission%
      no_permission: "%prefix% &cYou do not have the required permissions to use this command! Silly Goose. You need &e%permission% &cto use this command!"

      # The cooldown message sent to players on cooldown.
      # Supported Placeholders: {X}
      cooldown_message: "&cYou must wait &e{X} &cseconds before giving another hug!"

    #
    # Experimental Messages
    #
    experimental:
      passive_mode: "%prefix% &3Passive mode is enabled. You cannot harm other players!"

    #
    # The command usage messages.
    #
    usages:
      hug: "&3&lProper Usage &8&l>> &b/hug <player>"
      info: "&3&lProper Usage &8&l>> &b/hugs info <player>"
      total: "&3&lProper Usage &8&l>> &b/hugs total"
      purge: "&3&lProper Usage &8&l>> &b/hugs admin purge <player>"

    #
    # The gui names.
    #
    gui_names:
      confirmation: "&3&lHugs &8&l>> &8Confirmation Page"
      leaderboard: "&3&lHugs &8&l>> &8Leaderboard"

    guis:
      confirmation:
        name: "&3&lHugs &8&l>> &8Confirmation Page"
      leaderboard:
        name: "&3&lHugs &8&l>> &8Leaderboard"
        player_head_name: "&a%rank%. &7%player%"
        player_head_lore:
          - "&bHugs Given: &7%hugs_given%"
          - "&bHugs Received: &7%hugs_received%"
        text_format: "&7&l%rank%. &6%player% - %total%"

    [​IMG]
    What's on the v2.1 ToDo list?
    I plan on adding MySQL support and making the Leaderboard better.

    How often will this plugin be updated?
    I honestly don't know. I will update it whenever a new version of block game comes out, but as for features, that's a toss-up. I want for any and all features I have planned for the plugin to come out soon, but life is unpredictable and could set me back. Then there is the fact that I'm still relatively new to Java and don't know all of the "proper" Java conventions.

    If you have any questions, comments, concerns, or suggestions, don't hesitate to ask them. All I ask is that you post them in the discussion section and not the review section. While you're at it, if you like this plugin, consider rating it and leaving a suggestion.

    [​IMG]
    If you like my plugins and want to see more plugins like this or want to support me in my future endeavors, then consider donating. It truly helps and all donations go towards the further development of future plugins.
    Click here to donate!
    psssst. You can also click the image. :3

    [​IMG]
    You hereby recognize that I, ShadowMasterGaming, am the creator of the Hugs plugin and own all rights to it. You also agree not to claim it as your own work or redistribute it in any way shape or form.
    Govindas likes this.

Recent Updates

  1. Hugs Update 2.0.5 - Update Fix
  2. Hugs Update 2.0.4
  3. Hugs Update 2.0.3

Recent Reviews

  1. Zhyn
    Zhyn
    5/5,
    Version: 2.0.4
    Cute plugin that works great. If you don't give anyone permission people can still shift-click to give hugs (which is what I wanted)
  2. AAMicah
    AAMicah
    5/5,
    Version: 2.0.3
    Fun plugin. Well-made. Active and helpful Developer. Enjoyable. Hugging strangers can be fun.
  3. kotarobo
    kotarobo
    5/5,
    Version: 1.9
    A good plugin!
    The player seemed to know the goodness of hugging: D
    There were people who were confused by hugs from strangers.
    Can we make the whitelist available to those who need it?
    Also, if you hug directly, you are encountering, so you can do it irrespective of whitelist, or you may have a setting that you can not even do.
  4. Arceeuuss
    Arceeuuss
    5/5,
    Version: 1.6
    The plugin is great ! Seriously with PlaceHolders implemented , it's perfect ! Great developer ! Thanks for the plugin :D
  5. Arceeuuss
    Arceeuuss
    5/5,
    Version: 1.5
    Good plugin ! Can you implement PlaceHolderAPI ? I want to use it with another plugin to display how many hugs the player have gotten like %total_hugs% or something like that ! Thanks !
    1. ShadowMasterG23
      Author's Response
      Thank you for your review. I am certain that I can get the plugin to work with PlaceholderAPI, but I will have to make sure that it is still compatible with 1.9-1.12. Lots of testing is required before I post these updates. :P
  6. Bungeefan
    Bungeefan
    4/5,
    Version: 1.2
    Endlich ein solches Plugin, ich suche schon lange nach so einem lustigen Plugin. Bitte poste weiterhin Updates