Weight-RPG icon

Weight-RPG -----

Inventory weight mechanic just like in RPGs!



Description

Have you ever played RPG games like The Elder Scrolls, Fallout, or The Witcher? Did you notice that you can’t carry too many items? Do you ever wonder how realistic this feature would be in Minecraft? Well, now, with the Weight-RPG plugin, you can live it! Weight-RPG allows you to configure the weight of all Minecraft items. Upon reaching a specific inventory weight, the player will move slowly or even be unable to move and jump altogether.​

Features
  • Assign weight value to every item.
  • Custom weight for custom items by their names.
  • Boost Items that grant additional weight capacity.
  • There are three weight levels, so you can 'punish' players differently in each one. You can disable any level you want.
  • You can use permissions for weight level.
  • You can set the item's weight using the command /weight set <item> <weight value>
  • Players with permission weight.notify get a message for items that aren't in weight files. You can add them manually or use the command /weight add <item> <weight value>.
  • Custom weight values and penalties for every weight level before it takes effect.
  • You can disable jumps and movement for the player at any level you want.
  • You can disable players from picking up items at any level.
  • 100% customizable messages in messages.yml file.
  • HEX color support.
  • Messages for pick-up, drop, or place items.
  • 16 custom placeholders to use in messages.
  • Messages can be sent via action-bar or chat.
  • You can disable the plugin in certain worlds.
  • Players can have a cooldown for dropping items. This is to prevent players from throwing items to have maximum speed. You can disable this feature and modify the cooldown in seconds in the config file.
  • You can view an item's weight using the /weight get <item> command.
  • WorldGuard support. You can use the 'weight-rpg' flag to prevent the plugin from being used in certain regions (WorldGuard version 7.0 or later).
  • PlaceholderAPI support. You can use all these placeholders in any plugin that supports PlaceholderAPI (2.10.0 version or above).
How it works

The plugin checks the player's inventory every 3 seconds (configurable in config.yml) and when he drops, picks up, or places an item. The Items' weight values are in the Weight files.
(Blocks Weight.json, Tools and Weapons Weight.json, Misc Items Weight.json)
There, you will find all Minecraft items and their weight value.
You need to re-assign all the item values to your needs. But don't worry, it's one-time work. After that, remember to use '/weight reload' to apply the changes to the server. The plugin now calculates the player's inventory. If the value is more significant than your weight on the config file, it will penalize the player.
It works only when the player is in Survival or Adventure mode.​

Default item assignment
First, when the plugin loads for the first time, it will create 2 files (config.yml, messages.yml) and 1 folder. In the config file, you can configure the plugin. In the messages file, you can customize messages to your needs. In the Weights folder, you will find 3 additional files. There, you will assign the weight values for the items (ex DIRT=5). You must follow the format “ item=value” and for float values, use dot ‘.’ not comma ‘,’. There are 3 files for a more straightforward assignment. You must assign the weight values. DON’T USE THE DEFAULT ONES.​

Custom item assignment
After you configure the config file and assign all the weight values to items, use the command ‘/weight reload’ to apply the changes to the server. That’s it. To assign a weight value to a custom item, go to the config file in the “ custom-items-weight” section and write the name with color codes like the examples. You can use hex color with &#(color code).
&c&lThunder Sword=20 (Use the same format as mentioned above.)​

Boost Items Functionality
These special items can grant players additional weight-carrying capacity. When players have Boost Items in their inventory, their maximum weight capacity will increase, allowing them to carry more items without reaching the weight threshold. To define Boost Items and their respective weight enhancements, navigate to the config.yml file. Under the "boost-items" section, add the names of the Boost Items and their associated weight values. The format used is "itemname=boost_weight," which is similar to the custom item assignment.​

Command and Permissions
  • /weight
    Permission: weight.use
    Description: show the player weight and other info from messages.yml.
  • /weight help
    Permission: weight.help
    Description: show the player plugin's command from messages.yml
  • /weight reload
    Permission: weight.reload
    Description: reload all files and apply changes to the server.
  • /weight get <item>
    Permission: weight.get
    Description: show the item's weight.
  • /weight set <item> <weight value>
    Permission: weight.set
    Description: set the item's weight.
  • /weight add <item> <weight value>
    Permission: weight.add
    Description: add an item to the weight files. The item will be on the Misc Items Weight file in the Additional Items section.
  • Permission: weight.notify
    Description: Players with this permission will be notified when an item isn't on the weight files.
  • You can use permission mode to calculate players' weight. To do so, you must add these three permissions: weight.level1.x, weight.level2.x, and weight. level3.x, where x is the weight level.
Use the ‘weight.bypass’ permission to exclude a player from the weight calculations.
Files
config.yml: https://pastebin.com/H1r030bC
messages.yml: https://pastebin.com/FQCmB8Bt
Blocks Weight.json: https://pastebin.com/7xQ8F14n
Misc Items Weight.json: https://pastebin.com/uc9YFS1g
Tools And Weapons Weight.json: https://pastebin.com/eHktBdar

Placeholders for PlaceholderAPI
%weight-rpg_current_weight% Shows the current weight of the player.
%weight-rpg_max_weight% Shows the maximum weight that a player could have.
%weight-rpg_armor_weight% Shows the armor weight of the player.
%weight-rpg_item_in_main_hand% Shows the weight of the item in the main hand.
%weight-rpg_item_in_second_hand% Shows the weight of the item in the second hand.
%weight-rpg_weight_level1% Shows the value of level 1.
%weight-rpg_weight_level2% Shows the value of level 2.
%weight-rpg_weight_level3% Shows the value of level 3.
Showcase
[​IMG]
[​IMG]

Video

Troubleshoot
upload_2022-9-29_1-12-39.png
Write the item name in any weight file and any section you want with its value, following JSON format. From version 2.10, you can use the /weight add command.

upload_2022-9-29_0-58-11.png
When you finish, just type the '/weight reload' command and you are done.

upload_2022-9-29_1-17-4.png
you didn't follow the JSON format, and you probably forgot the equals sign '='. Follow the JSON format, write the equals sign, and type the '/weight reload' command.

upload_2022-9-29_1-21-23.png
you entered an invalid float number.



If you have any issues with the plugin, join my discord server :
https://discord.gg/VxmTnjMmgw


Leave a 5-star review if you like my plugin! :)
Resource Information
Author:
----------
Total Downloads: 2,280
First Release: Sep 28, 2022
Last Update: Dec 21, 2023
Category: ---------------
All-Time Rating:
8 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings