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.
Hi there I'm running this on spigot 1.8 all commands work and I can get a sib chest but when I try and place it disappears off the ground and back into inventory no error messages just wondered if you'd seen the same effect
Of you'd like to login to server to see I can send ip via pm
@boidyluke
I'm not familiar with plotme. SiB only supports WorldGuard protection at the moment. Hope this helps.
Simply amazing, thanks for this great plugin!
edit:****
it seems to allow placement in plotme outside of the plots, ie if a player places a box at edge of their plot it goes over the path to the other plot, is there a workaround for this at all?
@eyalzh
For the record, a command within the plugin would be a good idea, as that requires Essentials 's /give command, or a very good knowledge of JSON tags for a 'vanilla' /give command to give it.
Thank you so much for continuing Build-in-a-Box!
@Odocy
Something like:
should work.
Can you make a give command where I could do something like; /sib give 'player' 'schematic-name' This would allow me to put that in my Gui Shop so my players can buy structures.
Next on your list should be excluded blocks that turn into air when placed, also having each sib named differently when held in hand. e.g. Farm_1 is called "Farm 1" in your hand.
How does one use this with chest shops
@xxxwonderxxx
I see. The dev version includes a permission per SiB (e.g. structureinabox.sib_farm) if the setting "permission-per-sib" is set to "yes".
I use pex and inheritance and if i add to default group then everyone inherits the negative permission overriding other given permissions.
@xxxwonderxxx
Hmm, what if you add -structureinabox.use to the default group?
its either because you have not set free-space check to no. Or you are trying to place on a block that is restricted in the config.
Hey every time I try to place down my Sib it keeps on saying (free space violation) .yes i am on a flat surface .im only using a 3x3x3 structure .and i saved the schematic
can someone plzzzzz help me
Hey Eyalzh, Would it be possible to add a " permissionsneeded: true " choice to the config instead of the default everyone can use? Would help greatly with inherited permissions in pex as our non donators can use the sibs atm Btw works brilliantly :)
@TeeePeee
That's cool. Thanks for letting me know.
Hope you don't mind, I added support for your plugin in my project, MyZ. The code here just uses reflection to run your onPlayerPlaceBlock event at HIGHEST priority instead of HIGH.
While doing so, I had to decompile two of your classes (main class and listener class) which I disposed of afterwards.
If you have a problem with this, don't hesitate to drop me a personal message and I'll remove it ASAP.
Well thank you!
@baksovic111
Yes, I see now. Really an embarrassing escaped bug! Thanks for reoprting. I'm working on a fix, which I will soon publish to Bukkit. If you want, you may try the dev build:
http://199.195.253.33:8081/nexus/content/repositories/releases/org/samson/bukkit/plugins/structureinabox/StructureInABox/0.9.1/
@eyalzh
In survival mode! When in hand 1 SiBs it infinite, and when more than one is not infinite! Check it out. I enter the command, and to me the one SiBs. After I set it for the land - and SiBs structure appears again in my hand ..