Fixes bugs with Blueprint locale.

Ensures newly saved Blueprints appear in blueprint manager.
This commit is contained in:
tastybento 2019-05-24 19:42:51 -07:00
parent 068b0e7667
commit 184a5712ae
3 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,6 @@
package world.bentobox.bentobox.api.commands.admin.blueprints; package world.bentobox.bentobox.api.commands.admin.blueprints;
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.commands.ConfirmableCommand; import world.bentobox.bentobox.api.commands.ConfirmableCommand;
import world.bentobox.bentobox.api.user.User; import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.blueprints.BlueprintClipboard; import world.bentobox.bentobox.blueprints.BlueprintClipboard;
@ -38,6 +39,7 @@ public class AdminBlueprintSaveCommand extends ConfirmableCommand {
this.askConfirmation(user, user.getTranslation("commands.admin.blueprint.file-exists"), () -> { this.askConfirmation(user, user.getTranslation("commands.admin.blueprint.file-exists"), () -> {
parent.hideClipboard(user); parent.hideClipboard(user);
new BlueprintClipboardManager(getPlugin(), parent.getBlueprintsFolder(), clipboard).save(user, args.get(0)); new BlueprintClipboardManager(getPlugin(), parent.getBlueprintsFolder(), clipboard).save(user, args.get(0));
getPlugin().getBlueprintsManager().addBlueprint((GameModeAddon)getAddon(), clipboard.getBlueprint());
}); });
return false; return false;
} else { } else {

View File

@ -147,7 +147,7 @@ public class BlueprintManagementPanel {
private PanelItem getWorldInstrTile(Environment env) { private PanelItem getWorldInstrTile(Environment env) {
return new PanelItemBuilder() return new PanelItemBuilder()
.name(t("world-name-syntax", TextVariables.NAME, Util.prettifyText(env.name()))) .name(t("world-name-syntax", TextVariables.NAME, Util.prettifyText(env.name())))
.description(t("world-instuctions")) .description(t("world-instructions"))
.icon(Material.GRAY_STAINED_GLASS_PANE) .icon(Material.GRAY_STAINED_GLASS_PANE)
.build(); .build();
} }

View File

@ -225,6 +225,7 @@ commands:
parameters: "<blueprint name>" parameters: "<blueprint name>"
description: "save the copied clipboard" description: "save the copied clipboard"
management: management:
back: "Back"
instruction: "Click on blueprint then click here" instruction: "Click on blueprint then click here"
normal: "Normal" normal: "Normal"
nether: "Nether" nether: "Nether"