Structure in a Box
Description
This plugin lets you create special items that you can give to the players on your server. When players place these items, they will turn into a structure created in advance. These items are called “Structures-in-a-Box” or just SiBs.
The plugin uses the WorldEdit mechanism of pasting MCEdit schematics into the game. This means that anything copied and saved as a schematic file, can be used as the structure.
For example, you can give the players a chest that turns into a small base when placed, and a different chest, which will turn into a small vault.
Creating SiBs (admins)
To create a new SiB, follow these steps:
- Build the structure. If that structure has an “entrance” or front, make sure it is facing east.
- Using WorldEdit, select the structure (you may use
//wand
for that purpose). Make sure not to select the ground beneath the structure. - Get as close as possible to the position where you want the structure to spawn in relation to the placed SiB. Then, type
//copy
to create the clipboard. At this point, you should normally face to the west. - Type
//schematic save MCEdit <schematic id>
to save the schematics - Type /sib create <schematic id> to create a SiB item.
It is important that the structure’s front will face the east. That way, the plugin will correctly auto-rotate the structure based on the direction the player is facing when placing the SiB.
Placing SiBs (players)
To spawn the SiB, the players only need to place the SiB item. If there is no space for the structure, they will keep the SiB and the structure will not be pasted into the game.
Kits
The SiB items can be added to kits. They are simply chest items (by default) with unique lore. Any kit plugin, which supports specifying lore on items, will consequently support SiBs.
Protection
The plugin supports WorldGuard. The structure (any corner of it) cannot be placed in regions where the player cannot build. In addition, the structure will never be placed if there is a solid block in the way.
Commands
- /structureinabox version - Get the plugin's version
- /structureinabox create <schematic-id> - Create a SiB for a given schematic id
- /structureinabox help - Display instructions on how to use the plugin (for admins)
You may use the /sib alias.
Players may also use the following command:
- /sibundo - Pick up the last SiB you placed and get the item back, as long as the session is not expired
Permissions
- structureinabox.admin - Allows you to use the Structure-in-a-Box admin command (default: admins only).
- structureinabox.use - Allows you to place Structure-in-a-Box items (by default everyone).
- structureinabox.undo - Allows you to undo (pick up) the last SiB (by default everyone).
Configuration
You may change the following settings in config.yml:
- box-material - The material used for the SiBs items (CHEST by default).
- max-sib-size - The maximum size of SiBs (10000 by default).
- display-name - The SiB item display name.
- lore-instruction - The instruction line added as lore to the SiB item.
- lore-identifier - The unique lore identifier used on the SiB item.
- free-space-check - Check for free space before placing down the structure (default is yes).
- check-all-solid-blocks - When free-space-check is on and so is this, check against all solid blocks.
- check-just-specific-blocks - When free-space-check is on, list the blocks to check against.
- world-guard-check - Check for collision with WorldGuard areas (default is yes).
- permission-per-sib - If this is set to yes, placing the SiB will require the permission structureinabox.use_{sib-name} (default is no).
- cooldown-time-ms - The number of milliseconds that need to pass before a player can place a SiB again (default 5000).
- cleanup-interval-ticks - Session cleanup time task interval in ticks (default 300).
- expired-session-time-ms - Session TTL in MS (default 30000).
Kudos
This plugin was designed and tested by the folks at WonderlandGaming for PvP and tracking servers.
@TheZerok666
You Are Doing Movecraft Ships Lol So am I im using SIB for PreGenerated Movecraft Structures and some other cool things
@eyalzh
Could you please update this to 1.8+? Also an option to let users get their structure to go back to the box would be cool. Like, it checks if the structure is the same size and has the same blocks in it, and just removes this blocks, giving the command user a box with that structure, which he can sell. Or the user could put a structure made by him in a box by selecting it (without making a schematic, because that'd require admin rights). Also would be really cool for this boxes to have value based on the number and type of the blocks in the structure: for example, my structure has 20 diamond blocks, 3 wool blocks and 250 wood blocks in it; the price per diamond block is $90, a wool block costs $5 and a wood block costs $3; I'd get $2565 as the "structure value" in the lore of the item, so that I could sell it with a command.
@Loraxe42
An offtop-ish comment that wasn't supposed to be seperate, but bukkit dev doesn't let you to tag 2 people in one post, kek<
I'm making an rp server with moving ships and I added this plugin to my server to let users buy ships and just put them on water in one click... And now I see the creator of Movecraft here. Seems that we have the same reason to install this plugin? This is funny :D Also, I absolutely love what you did with Movecraft.
Offtop ends<
I have a Question I am using this plugin for reasons i really don't want to discuss but I am worried when my server will get more players There Will come Griefs with it Now im worried because in my World Guard Region players can still place down chest and create Structures Which would ruin Spawn (World Guarded Region) Is there any way i can prevent this from happening
Thanks -TimberghostGaming
Is this gonna be updated at all?
@eyalzh
I'm using the latest version of WorldEdit (6.0) When I place, it just says Cooling down... please wait.
EDIT: works now, just had to downgrade worldedit. Thanks : )
@Loraxe42
Thanks. Your input is very helpful.
Update: For reasons I can not currently explain, when I put WE 6.0 back on the server (with asyncworldedit as well), SiB started working fine. Signs and containers were fine. I will research further.
EDIT: Ok, I think I understand the behavior now. If you restart a server with WE 6.0, and immediately attempt to place a SiB, it will fail with no errors. I tested it with and without AsyncWorldEdit. If, however you first paste any schematic, or select an area and set it to anything, it somehow "initializes" worldedit and SiB will work fine. I tested it with having one user set an area to air, and a different user could use SiB just fine. So it is not user specific.
For my needs, this is adequate. I have a system that is constantly pasting worldedit schematics automatically anyway, so I'm 99% sure that it will work for the users. But if you have time, it may bear looking into for other server's needs.
Also, with WE 6.0, if you try /sibundo you get an error on the console. This is the error:
http://pastebin.com/migfTaGD
@eyalzh Thanks for replying, eyalzh
Unfortunately, those same newer versions of Worldedit are necessary to function in 1.8. I tested SiB in 1.8 using WorldEdit 6.0, and can confirm it does not work.
Symptoms:
Create a SiB using /structureinabox create - succeeds, item is in inventory
Place item - nothing happens, no errors in game or on console
Place item a bunch more - get message "cooling down. Please wait..."
From this I presume all of it is working except the actual pasting of schematic. Having worked with the WorldEdit API myself, I assume this is due to them changing the API in 6.0 (which causes problems for my plugin, Movecraft, as well BTW)
If I use WorldEdit 5.6.2 (5.6.3 won't even load on 1.8), then all signs are blank, all containers are empty, and any other block that has special tile data is not pasted correctly. Sadly this won't work for my purposes, as the warships I am pasting need signs with specific text on them. However I can confirm that it does get pasted by SiB.
Also, Movecraft integrates with WorldEdit 6.0, but not 5.9.
Since I do have experience with the WorldEdit API, I would be happy to update the plugin to WE 6.0 if you like. I'm rolling out a server where people can purchase warships from shipyards, and this plugin would really save me a ton of time and effort.
@Jaredcast
Hi, can you tell me what version of WorldEdit you are using?
@eyalzh
When you place the chest, nothing happens ; p anyways, pls do your best to continue the plugin.
@Loraxe42
The plugin should work for 1.8. The issues are likely related to newer versions of WorldEdit.
I'm looking for a plugin just like this, and I wouldn't mind updating it to 1.8 if anyone has a way to reach the author. I don't want to have to make my own system by hand, it would be much simpler to update this one. Let me know if anyone knows a way.
Is this still active has this plugin been abandon?
Please update to 1.8! :D
Hey is this still active? When I place the box it says cooling down, please wait….. I wait 5 seconds (that is what I have it set to in my config 5000) and it still says the same message. I have check-all-solid-blocks set to no, I am running my server on 1.7.10 spigot. I have the latest update of world guard and world edit. What should I do?
A preview mode before the SIB actually constructs the build would be amazing.
@moisesortiz
Adding a timer for the structure to be deleted after a set time would be a good addition to this plugin
As well as a way of allowing other players to remove whatever is built. By this I mean the following... I run a DayZ type server and I want my players to be able to construct bases. However I also dont want them blocking certain parts of the map, or filling it with builds all over. So I want to allow my players to be able to destroy what others build. Perhaps make a chest spawn next to whatever the schematic is saved and have it so if players hit the chest enough it will remove the entire build :P Could be fun additons to any PvP type scenario in which one person can build a base and others can destroy
@moisesortiz
I agree. this would be a good implementation
Is it possible to make temporary schematics that after a set time the schematic dissapears?