This plugin adds presents to your server! Pick a present, fill it up, give it to a friend to open.
I have seen a lot of implement
ations ofpresent plugins however none of them do what I wanted or are outdated. This is also my first public plugin!
The present plugin allows you to create presents (without crafting requirements) that can hold any item.
The presents will then exist in your world as items. They can be stored in chests, thrown into lava (be careful not to do this), placed on your head, put inside other presents or most likely given to another player!
The present plugin requires my core library plugin to work and is built with Java 17!
1. Type "/present"
2. Select your present look
3. Fill your present
4. Give your present to a friend
5. Right click with the present in your main hand to open the present!
*Presents can not be placed on the ground (if you try it will just open them as intended).
The present plugin creates fully persistent presents that stores an item stack.
Code (YAML):
name: ABPresent
version: '1.8'
description: This plugin allows players to create presents with items inside.
author: oobila
api-version: 1.16
depend: - ABCore
softdepend: - Vault
commands:
present:
description: Creates a present
permission: abpresent.present
permission-message: You do not have permission to make a present!
usage: /<command>
permissions:
abpresent.present:
description: Allows players to create a present.
default: true
abpresent.*:
description: Allows access to
all abpresent commands.
default: op
children:
abpresent.present: true
################################ # Present language config file # Author: oobila ################################ present-item-name: Present
crafted-by-lore: Crafted by
{0
} present-currency-lore: '
{0
}'
present-size-lore: 'size
: {0
}'
select-present-gui-title: Select a present
fill-present-gui-title: Fill the present
present-receive-gui-title: Present
present-receive-message: 'You have just received
: {0
}'
present-receive-message-multi: 'You have just received
: {0
}({1
})'
present-open-crafter-message: '
{0
} opened the present you made!'
present-cleanup-message: This present does not have
any data!
(it may have been considered old and deleted
) present-fill-cancel-message: Present closed without being filled, present creation canceled
present-illegal-item-message: You are not allowed to put
{0
} in a present, present creation canceled
removed-present-message: Removed
{0
} presents from before
{1
} insufficient-funds-message: You do not have enough to buy this present
Reload the plugin config without reloading the plugin! The plugin config can be reloaded with the /ab-reload command from the core library
Config and language support
All GUI titles, chat messages, present names and present textures can be updated in the config so not only is it fully customisable but it is ready to support more languages.
By default presents can not store shulker boxes as this would give a player access to an infinite inventory size (shulker box inside present inside shulker box etc). There is a blakcklist config for this and other materials.
Worried about disk space? There is a cleanup script that is run on startup which deletes data for any present created before a specified date in the config. This allows admins to easily manage the amount of disk storage this mod will take up. (this is likely to only be required on larger servers).
MySql? We now have it! just update your config with
sql-enabled:true and add your connection details. Providing you have entered these in correctly the present data will now be saved to your database (no further setup required). It will even push all your existing present data from file storage.
This allows presents to be transfered and used on a multi-server network