Minecraft Data Packs / Server Utility

KeepInventory+ (KeepInventory on a per player bases)

  • check_circle Functions
  • 5,758 views, 3 today
  • 330 downloads, 0 today
  • 7
  • 10
MadOliveGaming's Avatar MadOliveGaming
Level 31 : Artisan Engineer
16
KeepInventory+
Enable/Disable the KeepInventory gamerule for each player individually!

Ever ran into the problem that part of your server/realm's player base wanted to play with KeepInventory on and part didn't?
That's Exactly what KeepInventory+ solves!

This datappack adds two teams: KeepInventoryYes & KeepInventoryNo.
By default all players who join for the first time since this datapack was installed will be assigned to KeepInventoryNo, meaning their inventory and part of their XP will drop upon death.

By making people join team KeepInventoryYes, using the default /team command, you will enable KeepInventory for that specific player and they will keep all their XP and items upon death. At any time you can return the players to team KeepInventoryNo using the same default /team command.

Ofcourse you can also change the default team, so all new player automatically get assigned to KeepInventoryYes instead.

Player's names are marked green if they play with and red if they play without KeepInventory. This way players know, for example so they know not to kill the red players as a joke or lure them into deadly pranks. If you don't want this you can remove the colours from the teams using the /team command. They do not effect the datapack's functionality, so feel free to do this if you preffer.


How does this work?

This datapack turn KeepInventory to true for the entire world! So technically everyone will be playing with KeepInventory on!
However, if a player assigned to team KeepInventoryNo dies the following will happen:
- 2 invisible and invincible chest minecarts will be summoned at the player's location.
- The player's entire inventory will be copied to the two chest minecarts
- The player's inventory is cleared and the chest minecarts are killed (causing the items aka the player's inventory to drop)
- XP orbs are summoned at the players death spot equal to 7 times their current level up to a maximum of 100 (just as it would normally)


IMPORTANT!

This datapack enables KeepInventory for the world and disables ImmidiateRespawn! DO NOT change these rules, this will break the datapack!
This datapack is incompatible with other datapacks that require the use of teams as a player can never be on more than one team at the time!
CompatibilityMinecraft 1.17
toMinecraft 1.18
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome