bentobox/src/main/java/world/bentobox/bentobox/panels/BlueprintManagementPanel.java

28 lines
739 B
Java
Raw Normal View History

Implemeted Blueprint bundles and blueprints (#672) * A prototype for Blueprint bundles and blueprints This stores blueprints inside bundles. Each bundle can have up to 3 blueprints defines by the World.Environment. This is not a finished manager. It just handles all the saving and loading side of things. I thought this would help you so you can then concentrate on the UI. * WIP: Copy blocks to Blueprint done. * WIP Pasting done. * WIP: Added BlueprintsManager to ultimately replace SchemsManager. * Moved blueprint suffix and changed to .blu * Fixed unit test. * Now tested and working. Integrated with new island and resetting island. If there are no blueprint bundles or blueprints then a default bedrock set will be made and put in the game mode addon's blueprints folder. Still to do: enable schems to be loaded and pasted for legacy support. Add blueprints and a bundle to GameModeAddons like BSkyBlock. * Renamed most of the classes * Cleaned up clipboard and paster. * Further cleanup on blueprint clipboard and paster. * Merged blueprint classes into one package. * Put Blueprint data objects in their own package. Isolated schems classes for later removal. * Renamed admin command classes and changed locale files. * More clean up to remove schems * Schem to blueprints converter done. Converts schems to blueprint bundles and sets up a default set. Tested the happy-path. Need to do more testing on edge cases. * Added basic UI for development. Fixed bug with schem conversion. * Adds permissions into the blueprints. Fixes tests, cleans up some naming * Added IslandCreationPanel and created BlueprintManagementPanel * Fixed JSONDatabaseHandler's constructor being public * Made the Blueprints button in ManagementPanel open the Blueprint management panel * Fixed tests and ignored one (NPE)
2019-05-15 20:16:41 +02:00
package world.bentobox.bentobox.panels;
import org.eclipse.jdt.annotation.NonNull;
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.user.User;
/**
* @author tastybento, Poslovitch
* @since 1.5.0
*/
public class BlueprintManagementPanel {
private static final String LOCALE_REF = "blueprint-management";
private BlueprintManagementPanel() {}
public static void openPanel(@NonNull User user, @NonNull GameModeAddon addon) {
PanelBuilder builder = new PanelBuilder()
.name(user.getTranslation(LOCALE_REF + "title"))
.size(54);
builder.build().open(user);
}
}