mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Fixes bugs with Blueprint locale.
Ensures newly saved Blueprints appear in blueprint manager.
This commit is contained in:
parent
068b0e7667
commit
184a5712ae
@ -1,5 +1,6 @@
|
||||
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.user.User;
|
||||
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"), () -> {
|
||||
parent.hideClipboard(user);
|
||||
new BlueprintClipboardManager(getPlugin(), parent.getBlueprintsFolder(), clipboard).save(user, args.get(0));
|
||||
getPlugin().getBlueprintsManager().addBlueprint((GameModeAddon)getAddon(), clipboard.getBlueprint());
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
|
@ -65,14 +65,14 @@ public class BlueprintManagementPanel {
|
||||
SLOT_TO_ENV = ImmutableMap.of(3, World.Environment.NORMAL, 5, World.Environment.NETHER, 7, World.Environment.THE_END);
|
||||
ENV_TO_BP = ImmutableMap.of(World.Environment.NORMAL, NORMAL_BP, World.Environment.NETHER, NETHER_BP, World.Environment.THE_END, END_BP);
|
||||
}
|
||||
|
||||
|
||||
private String t(String t) {
|
||||
return user.getTranslation("commands.admin.blueprint.management." + t);
|
||||
return user.getTranslation("commands.admin.blueprint.management." + t);
|
||||
}
|
||||
|
||||
|
||||
private String t(String t, String... vars) {
|
||||
return user.getTranslation("commands.admin.blueprint.management." + t, vars);
|
||||
}
|
||||
return user.getTranslation("commands.admin.blueprint.management." + t, vars);
|
||||
}
|
||||
|
||||
public void openPanel() {
|
||||
// Show panel of blueprint bundles
|
||||
@ -147,7 +147,7 @@ public class BlueprintManagementPanel {
|
||||
private PanelItem getWorldInstrTile(Environment env) {
|
||||
return new PanelItemBuilder()
|
||||
.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)
|
||||
.build();
|
||||
}
|
||||
|
@ -225,6 +225,7 @@ commands:
|
||||
parameters: "<blueprint name>"
|
||||
description: "save the copied clipboard"
|
||||
management:
|
||||
back: "Back"
|
||||
instruction: "Click on blueprint then click here"
|
||||
normal: "Normal"
|
||||
nether: "Nether"
|
||||
|
Loading…
Reference in New Issue
Block a user