HomeJavaModsWeight-RPG
Weight-RPG
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
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
Use the ‘weight.bypass’ permission to exclude a player from the weight calculations.
Files
Spoiler: File list
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
Spoiler: Placeholders List
%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
Spoiler: Drop 1 item message
[​IMG]
Spoiler: Drop 64 items message
[​IMG]

Video
Spoiler: Video by fir:

Troubleshoot
Spoiler: 'Item' isn't in the weight files
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.

Spoiler: 'Item' isn't in the weight files 2
upload_2022-9-29_0-58-11.png
When you finish, just type the '/weight reload' command and you are done.

Spoiler: Index 1 out of bounds for length 1
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.

Spoiler: For input string: 'xxxxx'
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! :)

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Weight-RPG is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.14, 1.15, 1.16 and newer. Downloaded 2,422 times (via Spigot). Download it and open it directly in the game.

Explore more