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!
@chingo247
I'm not so deep in this theme but probably yes.
I'm currently thinking about removing the holo's, because they tend to completely crash the plugin... I use the holo's out of practical reason, because they don't take in actual space.
At the moment I get this
java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at net.minecraft.server.v1_6_R3.EntityTracker.updatePlayers(EntityTracker.java:149) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:583) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
So I went to their source: https://github.com/filoghost/HolographicDisplays/blob/master/HolographicDisplays/src/com/gmail/filoghost/holograms/object/APIHologramManager.java
You can see that they are using a for loops to iterate over their Collections. If the methods were to be called by instances the server will completely crash.
I already submitted a ticket there, to figure out what was wrong.. Do you know by any chance if HoloAPI is thread-safe?
BTW Use HoloAPI instead of HolographicDisplays (or add support to HoloAPI). Community are splitted between them.
Managed to reduce it to 7,5MB by throwing excluding some stuff I don't use, I am not going to switch database just because the file would be "too big". I'll just try to leave the amount of versions low :P
@wiedzmin137 or maybe i've done someting wrong there.. but I can't find anything there that shouldn't be there (in my pom.xml)
I'll be checking it over now
@wiedzmin137 That would still leave me with 11MB of Hibernate xD
@chingo247
You can use SQLite instead.
@wiedzmin137 My project is running Hibernate and a HSQLDB (with a HSQLServer) those together will get you +- 13 MB. HSQL is not something that can be installed (it's just a jar).
If I were to use MySQL all users need to install a MySQL Server (212MB) which can be found here: http://dev.mysql.com/downloads/mysql/ Then I would be like: good luck and have fun installing that :D
Which would probably be like a big middle finger to most people who will be downloading this plugin.
HSQLDB features fast storing and retrieval of complete files (in my case schematics), caching, in-memory database and most important an easy setup
Just one question for now - why do you put libraries into plugin? 13MB is "probably" too big, even Essentials or McMMO doesn't have it so much.
@steam323 It's maven and some of my dependencies are on a private repository because some plugins don't support maven themselves.
Why do you want to compile it? There is file on bukkit, right? or is it not visible?
Dude i have no idea how to compile your source. :/ I'm just the builder on my friends server.
Uploaded another one (deleted the old one) with permissions and fixes:
0.9.5
I'm releasing an alpha version now. Note that this version is experimental, it doesn't feature any permissions (yet). By releasing the alpha version I hope to find bugs and fix bugs faster. I'm currently on my own and I figured this is the best way to get this plugin out of experimental state as soon as possible.
If you find any bugs please report them using the ticker. If you have any other questions leave a comment or pm me.
Note:
@steam323
Already fixed the reload issue, but it would be nice if someone helped with the Perms. I don't even know if I need them... As many of this plugin features are build on top of other plugins and their perms.
At the moment I use WorldGuard to guard the regions and make sure structures won't overlap regions of other players than the player (unless is an owner of that region) Still have to build in a feature that restricts the user to build only within his owned regions, but I really need to get this thing tested and I think it would be for the best to release a test (alpha) version to do so. I can write the feature while it's being tested and fix the bugs along the way.
I can release it, but please refrain from using it on a crowded server, unless you are testing it.
Im currently facing this error:
java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextNode(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at net.minecraft.server.v1_6_R3.EntityTracker.updatePlayers(EntityTracker.java:149) at net.minecraft.server.v1_6_R3.MinecraftServer.t(MinecraftServer.java:583) at net.minecraft.server.v1_6_R3.DedicatedServer.t(DedicatedServer.java:227) at net.minecraft.server.v1_6_R3.MinecraftServer.s(MinecraftServer.java:488) at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:421) at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
nvm I think I fixed it. It was the combination of AsyncWorldEdit and Holographic Displays. First i had the displays to show the structures current progress. after modification the update method is not thread safe, which could be a problem when using AsyncWorldEdit
@chingo247
Is it still coming out tonight and btw I might be able to get a friend to help you out with perms. He might also be able to help you with your reload issue
@chingo247
That's fine. I have like 3 months to wait :P
@wowzersam
I have decided to move the release to Monday to give myself another weekend. The bug I was talking about still causes the server to overload and crash on reload and I can't figure out why :@
Sorry for the inconvenience :$
wow this looks great cant wait to see the alpha release ...
maybe in a later release you could add
< clicking the plans on a chest with the materials in it to build the house>
@wowzersam I plan to release the alpha version Friday next week (June 6). For now im stuck with a bug that causes my plugin to break after reload... which is bad... Next to that i have to write permissions, which i'm still completely new to.
After alpha release I hope to get more devs on this plugin to speed up the development (which is rather slow at the moment).
@chingo247
How's development on this coming?