StructureAPI
The StructureAPI
~ Loading and placing schematics has NEVER been SO EASY ~
The StructureAPI is that provides a convenient way to load and place schematics. Players can pick these schematics (also referred to as plans) from a menu and place them in the world. Scroll down to 'Quick Start' or watch the 'Quick Demo' to know more about how to setup your server with plans. StructureAPI aims to provide servers with a wide range of tools to place structures.
For older versions...
see structureapi 2.1.0 for the old page
Upgrading from 2.0.0 or 2.1.0? READ THIS!!
If you haven't created a backup yet CREATE BACKUPS OF YOUR SETTLERCRAFT-CORE DIRECTORY!!!. This update will upgrade the database and THERE IS NOW WAY BACK, NO DOWNGRADE POSSIBLE. Unless ofcourse you made backups ^^
Current Features
- Generate plans from schematics
- Loading plans into a fancy menu
- Select plans from a menu
- Buy plans from a menu (requires Vault)
- Build a structure or continue construction of a existing one
- Demolish a structure
- Rollback structures (since 2.2.0)
- Stop construction or demolition of a structure
- Structures don't overlap each other
- Substructures, structures may be placed inside other structures (configurable to enable/disable)
Quick Demo (2.0.0)
Quick Start
- Download schematics from any website (for example minecraft-schematics.com)
- Place the downloaded schematics within "plugins/SettlerCraft-StructureAPI/generate"
- Start the server or execute the command "stt generate plans" in the server console
- Place the schematics together with the generate XML in "plugins/SettlerCraft-StructureAPI/plans"
- Restart or reload the server
- Plans are now available in the menu, you can open the menu by either using the /stt menu or /stt shop
Note: There is a small requirement for loading the schematics into SettlerCraft. All schematics need to be placed in neutral position which means the schematic needs to be aligned to the east (front pointing to west), unless you don't care about it's orientation. You can do this by simply using the command '/stt rotate [structureid][degrees]' which will rotate a schematic permanently.
Commands (2.2.0)
See github commands for StructureAPI 2.2.x
Permissions
See github permissions for StructureAPI 2.2.x
Installation
See github installation for installing StructureAPI 2.2.x or higher
Required plugins/dependencies
- SettlerCraft-Core - Core functionality of SettlerCraft, contains a distribution of Neo4j database
- SettlerCraft-MenuAPI - Menu library of SettlerCraft
- WorldEdit 6.1
- AsyncWorldEdit - version 2.2.x (Note: you will need both AsyncWorldEdit and AsyncWorldEditInjector)
Optional Hooks
- StructureAPI-WorldGuard - WorldGuard support (requires worldguard 6.1)
- StructureAPI-HolographicDisplays - Hologram support (requires HolographicDisplays 2.1.x)
- StructureAPI-Towny - Support for Towny (since SettlerCraft-2.1.0) and ofcourse requires Towny. Mayors are able to place structures in the wildernis and players won't be able to place structures on or across plots they don't own.
- Vault 1.5.x
Optional Client Plugins (LiteLoader)
Developers
Project is under heavy development. Current implementation is very subject to change, extending this project will most likely break your code. A proper API and documentation is planned after this project has moved to Spigot.
https:github.com/chingo247/StructureAPI
Proper documentation is still in progress... Sorry! Also the API is still very subject to change.
Upcoming Features
- WorldGuard Default flags for structures
- Manual construction - Feed blocks to structures and make them grow
Found a bug ?
Report it here! and I'll try to fix it as soon as possible!
Ideas?
Ideas? Feel free to post below or PM me if u want!
@Liger_XT5 @Hmmcrunchy
It's currently awaiting approval, but it's finished and will be available soon. Let me know if you spot bugs or the towny-support is working as expected :)
Note that it's a separate plugin, so if you changes are needed I only have to re-release SettlerCraft-Towny . Also note that it's only compatible with SettlerCraft-2.1.0
UPDATE
Next release is being approved as we speak. This will feature:
@chingo247
cool - yea Im not keep on the revert on unclaim :)
@Hmmcrunchy
Great! I was afraid that I had to implement some kind of workaround ". I wasn't sure if I would be able to do that either :P. Now I can probably just give a warning if revertOnUnclaim is enabled .
@CaptainLink_
At the moment I do not save the area before the schematic was placed. The current demolish method is simple, it will remove all blocks.
In the future before a schematic is placed/build for the very first time. I will make a backup of the entire area. To not stress out the server it will simply do that operation in a few 'runs'.
The whole process as above described was also mentioned in the 'Upcoming Feature' section ;).
There is also the fact if players build on their own (placing blocks etc) inside schematics/structures and perform '/stt build [someId]' the whole structure will get overriden. I will have to look into storing NBT data which allows me to 'Tag' blocks.
I try to release do a release/update every 2-3 weeks. Today another version will be released. The next version (in 2-3 weeks) will have the features listed above.
I was wondering if you could fix two issues for me. It would to my server a lot good.
Issues:
If you could please fix these things, it would be great. Your plugin is amazing so far. Keep up the good work and do not abandon the project!!
@chingo247
Brilliant :D fab work
Yes we have that turned off the regen on unclaim as its a bit disastrous if people accidentally unclaim a plot with all their stuff in there
Admins can /Tw toggle RevertOnUnclaim to turn this feature off
All sounds excellent
@Hmmcrunchy
Almost finished here, during the tests I found out that Towny restores an area to its original state (when deleting a town/plot). I don't know if there is a way to opt this out..
The problem is that structures are getting demolished as result of the regen by towny, but the structures will still exist in the database of SettlerCraft. Therefore players would be unable to place other structures on the plot until the structure was actually removed. I haven't come up with a solution for this yet...
As for the collision detection for Towny Plots, thats actually working pretty well:
Anyway I'm trying to find a fix for the 'plot-regen', I will release all of SettlerCraft tomorrow. Note that Towny support is a standalone plugin and can therefore be released separately. Additional features can be added without having to re-release parts of SettlerCraft.
@chingo247
Hey yea it's one thing we have to live with, if you change name you have to inform admin before you do to get them to change town mayor
But of a pain but not a disaster :)
Great really looking forward to this thanks for all your hard work
Update
@Liger_XT5 @Hmmcrunchy
There might be a problem for implementing the Towny support. The latest Towny release does not support UUIDs. This means all checks that will be performed (e.g. checking if a player is mayor or if a player owns a plot) is done by comparing player-names.
There are also some scenario's I haven't covered yet, like what should happen to the structure if a plot gets cleared/removed? An option could be to also remove the structure (with or without demolishing it).
In any case I'm testing it out tomorrow, together with SettlerCraft-2.1.0
Update
Currently working on finishing upcoming release. There are still some features which are kinda buggy (rotate schematics by command & hologram selection ). If I'm not convinced enough about their behavior, they will by excluded from the upcoming release.
However, upcoming release is still an overall optimization. Which affects all child plugins (SC-MenuAPI, SC-WorldGuard, SC-HolographicDisplays). These plugins will all require updating.
Will be working on Towny support soon after. Don't know if I can get it done by the weekend. But will definitely make progress. I have to note that the Towny support will be a seperate plugin, so it could have it's own lifecycle (which improves maintainability).
Anyway I'll be posting updates here
@JamsyBoy14
Sorry i'm replying so late. I somehow did not notice your comment :/
The "green square" message was not meant to be there for non-worldedit-cui players. Only the text of selecting the area should have shown up (which was not the case). I removed the message and it will be fixed next release.
I don't really have a clue on why the schematics fail to load on your side. Could you tell me what plugins (the dependencies mentioned above) and versions you use ? Also please include the bukkit version you are currently using.
Also just to be sure... Did you download SettlerCraft just after the release? There was a critical bug with worldedit, which didn't left any error in the console, but it did break the schematic loading. It got fixed in a timeframe of 2 hours. I put up a notice here in the comment section short after. If above was the case, please re-download.
@chingo247
no problem at all, yea that's fine pop it over and we can give it a test over here :)
You put WorldEditCUI as an optional plugin but to left click in the green square it would make it mandatory because without it we can't see the green square?
Also I can't get the Schematic to load. It's just forever "ON_HOLD" . I guess I have missed a step or something. Nice plugin BTW
@chingo247
Sounds good, thanks!
@Liger_XT5
Forgot to move the description for schematics from the old page to this one ".
As stated there, schematics need to be aligned to the east (with front pointing to the west). This is MineCraft's natural position. If the schematic is saved that way, it will always have the front pointing towards the player if the schematic gets placed.
For now you could use a tool like MCEdit to get this done. However, I'm also working on a feature/command which enables you rotate schematics directly. All new placed structures that use the schematic will be placed with the right orientation. This will save you a lot of time, and could be done by multiple people (with the right permission).
A couple of my friends and I have been looking forward to your Towny addition. Though we're not in a big hurry, so take your time.
One of us was wondering, and I didn't notice it mentioned, is there a way to know which way the structure will be facing, or would we be able to get a preview of the placement before it's left permanently? It'd be a bit odd if a house is facing the backside of the neighbor's house, lol.
@Hmmcrunchy
Thanks for the explanation about the workings of Towny :D I already knew that the plots were configurable. The stuff about the mayors is completely new to me. With this info there are some extra strings attached, I will look into it some more next week, to see what's possible and offer convenient solutions for it.
Also got a optimization update I want to push through first. Which would break the current released SettlerCraft plugins (if they not get updated too..). After the update I could implement Towny support separately without having to re-release SettlerCraft.
I think I would have the Towny-support in a decent shape somewhere next week. I would really appreciate it if it could be tested it out with someone who has extent knowledge about Towny. So if we could test it out on your server by then, that would be nice :D Anyway I'll keep you updated ;)
@chingo247
Fantastic :D
Generally we use towny like so
Players can place outside of towns the wilderness
Players can buy a plot in a town and build in there our plots are 16x16 (towny default) but I think this is configurable in towny, so other servers may have larger or smaller plots
Players can purchase several plots at once side by side to create a larger area
Most of our players are town mayors meaning they can place anywhere in the town not just in the plot which is what is mainly aiming at -mayors buying town communal buildings such as churches to enhance their town and encourage players to join
If you need to test we can pop on our server and try it out
@Hmmcrunchy
I have already started on the implementation. In it's current state it allows players to place structures on a plot they own. This also means that the structure must strictly fit within the plot.
I don't think I might be able to find a way to allow structures to be placed on multiple plots. But then again I don't think Towny is used that way either (right?)
Anyway if it's like allowing player's to only place within their own plots I might be able to release it next week (Protection-like plugins require proper testing) ^^