Craftable Backpacks
Craftable Backpacks
This plugin adds a craftable backpack with 18 slots by default. The size can be changed. The client doesn't need any mods. Everything is manged by the server.
Crafting
This is the default crafting recipe:
You can change it in the crafting.txt file.
Update Annotation
If you are a new user of this plugin you can skip this point.
Configuration Changes
You need to put the following lines into you config.yml file, if they are not already there:
BackPackMaterial: LEATHER
DropBackpackContentOnDeath: true
You can do this by copying this line into the config if you have individual settings or by deleting the old config to get a new one.
UniqueId instead of Name
In the Minecraft News you can read: "We have pushed out an update that supports name changes, however we will not allow name changes until a future date."
That means plugin developers new have to use UUIDs (=UniqueId), because Name won't be static anymore. I changed the way the plugin saves the backpacks from the player's name to the player's UUID. As a result of this the plugin versions 1.2 and below wont be able to open Backpacks from the versions 1.3 (and higher). Of course the verison 1.3 will translate the old backpacks into the new format.
Features
- Craftable Backpack
- Resizable
- Can be opened by command(needs OP) or by rightclicking with the backpack
- Can be disabled in specific worlds.
- Crafting recipe can be changed.
- Saves automatically
- Backpacks can be grouped.
- Changeable item and durability
- If wished, drops content on death
Commands and Permissions
Command | Function | Permission |
---|---|---|
/backpack | Opens your backpack. | backpack.open.command.own |
/backpack <Owner> | Opens the backpack of the given player. | backpack.open.command.other |
/giveBackpack | Gives you a backpack. | backpack.give.self |
/giveBackpack <Player> | Gives the given player a backpack. | backpack.give.other |
/reloadBackpack | Reloads the plugin. | backpack.reload |
Configuration
The plugin automatically creates a config with the default settings. You can edit this file if you want (the old backpacks might not work with the new settings). If you want to reset your config simply delete it.
Permissions
Here are all permissions you can use:
Permission | Default |
---|---|
backpack.craft | true |
backpack.open.item | true |
backpack.open.command.own | OP |
backpack.open.command.other | OP |
backpack.give.self | OP |
backpack.give.other | OP |
backpack.reload | OP |
backpack.size.X (1 <= X <= 6) | false |
More information to backpack.size.X can be found in the next paragraph.
Resizing the Backpack
You can change the size of the backpack:
Minimum: 1 row
Maximum: 6 rows
If you want specific groups to have different backpack sizes you can give them permissions from backpack.size.1 to backpack.size.6.
If a player has more than one backpack.size.X permission the highest will be used. If a player has no such permission the size definded in the config will be used. Whenever I say size I mean the size of the backpack in rows.
Changing the Crafting Recipe
You can edit the crafting recipe of the backpack in the crafting.txt file.
It looks like this by default:
L=LEATHER
C=CHEST
LLL
LCL
LLL
If you want to change it pay attention to these points:
- Dont write more than one "information" in one line.
- In the recipe space acts like air.
- You dont need a 3x3 recipe like here, it can be everything between 1x1 and 3x3. The width and the height don't need to be the same.
- If you don't know the exact name of a item, you can also use the ID.
- Use only one character in front of each "=".
- Don't put empty lines in the file.
If you want to disable the crafting for a user set the permission backpack.craft to false for him.
Changing the Item Material
You can change the item material of the backpack, but all backpacks created with another(the old) Material will still be usable.
If you dont want previous backpacks to be usable you have to change the durability in the config.
You can use (placeable) blocks as item, they wont be places when the user opens the backpack, but you should pay attention to the durability: Blocks only can use a few numbers for durabilitys, most only allow zero, but e.g. the skull-block's durability can be higher than 0 and changes the skull-type.
Banning Worlds
If you want to disable using the backpack in a world, put the name of the world in the bannedWorlds.txt file. You can get the name of the world, by reading the name of the folder in which the world data is saved. Don't put more than one name in one line.
Grouping Backpacks
You can group backpacks by creating a file with the group name as file name(you can add ".txt") in the "groups" directory. In this file you can put as many world names as you want, but don't put more than one name in one line. If you don't know the name of the world, read the previous paragraph. The backpacks saved in a group are bound to the group name, so don't change it, if you don't want to reset the backpacks. Every world, that is not in a group or banned, uses the same backpacks as all worlds that are not in group. Don't put a world in more than one group.
Usage
This can be used e.g. if you have a skyblock world, and you don't want your players to transport items via backpack into this world from the normal world.
Attention
If editing the folder in which you are running the server needs admin rights, the plugin can't work, as it has to create a own folder in the "/plugins" Folder, where it saves important data as the config and the backpacks. Prevent using special characters in the config, otherwise the plugin could not be able to load.
Support
Please write a comment if you have any problems with the plugin or detected a bug. Please send me your server.log file if there was a exception. Your log file could be very big if you often use your bukkit server. If this is the case please send me only parts, which are similar to this picture, because they're interesting for me.
@MysticCity
I'm still working on blocks, thats because I only recommend to use items and not blocks.
@Karabin10203
Yes after an restart
but i change the Leather to an Chest and now i cant rightklick to open
@MysticCity
Are the changes loaded if you use the bukkit reload command or if you restart your server?
reloadbackpack doesent work
the chat say reloaded
but the changes in the config are not loaded
@melikoth
I'm sorry but I can't help you with that problem. I have no idea what the problem could be, but you have to know that the backpack works like a enderchest, so trading to other players wont help at all. The next thing is that I only can work with problems of the latest version which is at this moment v1.8, but the file for this version isn't available yet(for more information read my answer to Quakthorn's question below). Please try again with this version when it has been approved.
@Quakthorn
The Problem is the new Features are implemented in my newest File "Backpack v1.8" but bukkit didn't manage to approve the file yet. I uploaded the file on the 14th of August. Usually the Files are approved relatively fast but I dont know when my new version will be approved. I'm sorry but you'll have to wait for it. As I upload a new file I always update the plugin description to the latest features because I dont want to do double work and it worked for all the versions before, but I think I could add the version number file version to the descriptionto the description so that your problem wont happen again.
I seem to be having an issue where the player will craft a backpack, access it, and then the backpack stops functioning. If the player crafts a second backpack, the inventory is preserved. As soon as that backpack is closed, it becomes unusable again. It still remains tagged as a backpack. If traded to another player, the backpack cannot be opened.
Running 1.7.9, nothing in the error console.
BackPackColor: 2 BackPackName: Backpack BackPackMaterial: Jukebox BackPackDurability: 0815 NotOPMessage: You have to be OP to perform this command. NotAllowedMessage: You are not allowed to open your backpack here. BackPackRows: 1 AllowCrafting: true
This is my current config file, but it keeps default back to the Leather. I need to be a different item it doesn't conflict with my worldguard settings.
@Karabin10203
Yes.... thx
@ardragoon
Habe jetzt nach einiger Zeit mich mit Permissions angefreundet und jetzt implementiert. Du kannst dir ja oben in der Beschreibung die Permissions raussuchen die das machen was du brauchst. Das sollte jetzt alles gehen :D
PS: Achte auf die Permission Defaults, damit du den neujoiner erstmal alles verbietest wenn du willst ;)
@Darthmineboy
In Backpack v1.8 I implemented it this way: In the config you can define the default size. A player can have the permissions backpack.size.1 to backpack.size.6 like you suggested. If a player has 2 "size permissions" the larger size will be used. If a player has no size permission the default size from the config will be used.
I am pleased to see that you like my plugin and I hope you like the way I implemented your suggestion ;)
@xjonny84x
In Backpack v1.8 there is the permission backpack.craft which is true by default.
@JohOply
I implemented
backpack.craft backpack.give.self backpack.give.other
backpack.use is "splitted" into
backpack.open.item backpack.open.command.own backpack.open.command.other
I hope you can use these three as well :D
@Artemuidak
I added the command in exactly the way you suggested. The permission is backpack.open.command.other and the permission default is OP.
@thequestingbeast
I added the permission backpack.size.<size> where <size> must be between 1 and 6 (inclusive 1 and 6).
@MysticCity
I think i got it. If i understood this right you want different backpack sized via different crafting recipes. I'm planning to do this with permissions as some people requested in the comments. So your users and moderators can use the same recipe but you can set the default backpack rows to 1 and give the moderators the permission for 2 rows. Would that solve your problem?
@Karabin10203
ATM i can create in the Config 1 backback with xx rows
we need an option to cerate more as 1 backpack
so we can make backpack user with 1 row
backpack Moderator with 2 rows
and much more
Nice for the option in the config to change the leather thx
thx for the command information
@yankni
Backpack v1.7: Click here. All downloads can be found on the right under "Recent files".
@madtomic
Yes
@MysticCity
The command is "/reloadBackpack" and yes the backpack should be a piece of leather :D I might make the item configurable.
I dont understand what you mean with your last part, could you explain this?