• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Supported Minecraft Versions
  1. 1.12
  2. 1.13
  3. 1.14
  4. 1.15
  5. 1.16
  6. 1.17
  7. 1.18
  8. 1.19
  9. 1.20
SIMPLE BACKPACKS v1.0
Simple, customizable backpacks in just 10 lines (when compressed)!
Compressed? Remove all notes, options, line breaks, and permissions for 10-lines of backpacking beauty!


Download the file above, or copy the code from below.
Code:
# SIMPLE BACKPACKS v1.0
# Please do not delete these credits, unless you plan on fully overhauling this system.
# ---------------------------------------------------------
# Created by Eyzk - 08/15/2023
# Distrubution and modified usage allowed with credit
#
# Socials: https://linktr.ee/eyzk_
# ---------------------------------------------------------

options:
    name: &fBackpack # The name for your backpack
    size: 1 # The amount of rows in your backpack
    perm: backpack.use # The required permission to use this backpack (delete if unwanted)

command backpack: # Opens the player's backpack
    permission: {@perm}
    trigger:
        set {_bp} to chest inventory with {@size} rows named "{@name}"
        loop {@size}*9 times:
            set slot (loop-value)-1 of {_bp} to {bp::%player's uuid%::%loop-value%}
        open {_bp} to player

on inventory close: # Sets the items within the backpack (this system can be improved)
    if event-inventory's name = "{@name}":
        loop {@size}*9 times:
            set {bp::%player's uuid%::%loop-value%} to slot (loop-value)-1 of event-inventory
Author
eyzk
Downloads
31
Views
725
First release
Last update
Rating
0.00 star(s) 0 ratings