Skip to content

Commit d0791d9

Browse files
committed
rename 'selectmaterial' and 'replacematerial' commands, permissions and message path to 'select-material' and 'replace-material'.
Took 6 minutes
1 parent 5c90c4e commit d0791d9

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
lines changed

custom-ore-generator/src/main/java/de/derfrzocker/custom/ore/generator/CustomOreGeneratorMessages.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ public final class CustomOreGeneratorMessages {
6161
public final MessageKey COMMAND_SET_BIOME_SUCCESS;
6262

6363
// set replacematerial command
64-
public final MessageKey COMMAND_SET_REPLACEMATERIAL_USAGE;
65-
public final MessageKey COMMAND_SET_REPLACEMATERIAL_DESCRIPTION;
66-
public final MessageKey COMMAND_SET_REPLACEMATERIAL_NOT_ENOUGH_ARGS;
67-
public final MessageKey COMMAND_SET_REPLACEMATERIAL_SUCCESS;
64+
public final MessageKey COMMAND_SET_REPLACE_MATERIAL_USAGE;
65+
public final MessageKey COMMAND_SET_REPLACE_MATERIAL_DESCRIPTION;
66+
public final MessageKey COMMAND_SET_REPLACE_MATERIAL_NOT_ENOUGH_ARGS;
67+
public final MessageKey COMMAND_SET_REPLACE_MATERIAL_SUCCESS;
6868

6969
// set selectmaterial command
70-
public final MessageKey COMMAND_SET_SELECTMATERIAL_USAGE;
71-
public final MessageKey COMMAND_SET_SELECTMATERIAL_DESCRIPTION;
72-
public final MessageKey COMMAND_SET_SELECTMATERIAL_NOT_ENOUGH_ARGS;
73-
public final MessageKey COMMAND_SET_SELECTMATERIAL_SUCCESS;
70+
public final MessageKey COMMAND_SET_SELECT_MATERIAL_USAGE;
71+
public final MessageKey COMMAND_SET_SELECT_MATERIAL_DESCRIPTION;
72+
public final MessageKey COMMAND_SET_SELECT_MATERIAL_NOT_ENOUGH_ARGS;
73+
public final MessageKey COMMAND_SET_SELECT_MATERIAL_SUCCESS;
7474

7575
// set position command
7676
public final MessageKey COMMAND_SET_POSITION_USAGE;
@@ -161,16 +161,16 @@ public final class CustomOreGeneratorMessages {
161161
COMMAND_SET_BIOME_SUCCESS = new MessageKey(javaPlugin, "command.set.biome.success");
162162

163163
// set replacematerial command
164-
COMMAND_SET_REPLACEMATERIAL_USAGE = new MessageKey(javaPlugin, "command.set.replacematerial.usage");
165-
COMMAND_SET_REPLACEMATERIAL_DESCRIPTION = new MessageKey(javaPlugin, "command.set.replacematerial.description");
166-
COMMAND_SET_REPLACEMATERIAL_NOT_ENOUGH_ARGS = new MessageKey(javaPlugin, "command.set.replacematerial.not-enough-args");
167-
COMMAND_SET_REPLACEMATERIAL_SUCCESS = new MessageKey(javaPlugin, "command.set.replacematerial.success");
164+
COMMAND_SET_REPLACE_MATERIAL_USAGE = new MessageKey(javaPlugin, "command.set.replace-material.usage");
165+
COMMAND_SET_REPLACE_MATERIAL_DESCRIPTION = new MessageKey(javaPlugin, "command.set.replace-material.description");
166+
COMMAND_SET_REPLACE_MATERIAL_NOT_ENOUGH_ARGS = new MessageKey(javaPlugin, "command.set.replace-material.not-enough-args");
167+
COMMAND_SET_REPLACE_MATERIAL_SUCCESS = new MessageKey(javaPlugin, "command.set.replace-material.success");
168168

169169
// set selectmaterial command
170-
COMMAND_SET_SELECTMATERIAL_USAGE = new MessageKey(javaPlugin, "command.set.selectmaterial.usage");
171-
COMMAND_SET_SELECTMATERIAL_DESCRIPTION = new MessageKey(javaPlugin, "command.set.selectmaterial.description");
172-
COMMAND_SET_SELECTMATERIAL_NOT_ENOUGH_ARGS = new MessageKey(javaPlugin, "command.set.selectmaterial.not-enough-args");
173-
COMMAND_SET_SELECTMATERIAL_SUCCESS = new MessageKey(javaPlugin, "command.set.selectmaterial.success");
170+
COMMAND_SET_SELECT_MATERIAL_USAGE = new MessageKey(javaPlugin, "command.set.select-material.usage");
171+
COMMAND_SET_SELECT_MATERIAL_DESCRIPTION = new MessageKey(javaPlugin, "command.set.select-material.description");
172+
COMMAND_SET_SELECT_MATERIAL_NOT_ENOUGH_ARGS = new MessageKey(javaPlugin, "command.set.select-material.not-enough-args");
173+
COMMAND_SET_SELECT_MATERIAL_SUCCESS = new MessageKey(javaPlugin, "command.set.select-material.success");
174174

175175
// set position command
176176
COMMAND_SET_POSITION_USAGE = new MessageKey(javaPlugin, "command.set.position.usage");

custom-ore-generator/src/main/java/de/derfrzocker/custom/ore/generator/Permissions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public final class Permissions {
1414
public final Permission SET_VALUE_PERMISSION;
1515
public final Permission SET_BIOME_PERMISSION;
1616
public final Permission SET_CUSTOMDATA_PERMISSION;
17-
public final Permission SET_REPLACEMATERIAL_PERMISSION;
18-
public final Permission SET_SELECTMATERIAL_PERMISSION;
17+
public final Permission SET_REPLACE_MATERIAL_PERMISSION;
18+
public final Permission SET_SELECT_MATERIAL_PERMISSION;
1919
public final Permission SET_POSITION_PERMISSION;
2020
public final Permission ADD_PERMISSION;
2121
public final Permission ADD_ORE_CONFIG_PERMISSION;
@@ -31,8 +31,8 @@ public final class Permissions {
3131
SET_VALUE_PERMISSION = new Permission(SET_PERMISSION, "value", javaPlugin, true);
3232
SET_BIOME_PERMISSION = new Permission(SET_PERMISSION, "biome", javaPlugin, true);
3333
SET_CUSTOMDATA_PERMISSION = new Permission(SET_PERMISSION, "customdata", javaPlugin, true);
34-
SET_REPLACEMATERIAL_PERMISSION = new Permission(SET_PERMISSION, "replacematerial", javaPlugin, true);
35-
SET_SELECTMATERIAL_PERMISSION = new Permission(SET_PERMISSION, "selectmaterial", javaPlugin, true);
34+
SET_REPLACE_MATERIAL_PERMISSION = new Permission(SET_PERMISSION, "replace-material", javaPlugin, true);
35+
SET_SELECT_MATERIAL_PERMISSION = new Permission(SET_PERMISSION, "select-material", javaPlugin, true);
3636
SET_POSITION_PERMISSION = new Permission(SET_PERMISSION, "position", javaPlugin, true);
3737

3838
ADD_PERMISSION = new Permission(BASE_PERMISSION, "add", javaPlugin, true);

custom-ore-generator/src/main/java/de/derfrzocker/custom/ore/generator/command/set/SetCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public SetCommand(@NotNull final Supplier<CustomOreGeneratorService> serviceSupp
2424
registerExecutor(new SetValueCommand(serviceSupplier, javaPlugin, messages), "value", permissions.SET_VALUE_PERMISSION, messages.COMMAND_SET_VALUE_USAGE, messages.COMMAND_SET_VALUE_DESCRIPTION);
2525
registerExecutor(new SetBiomeCommand(serviceSupplier, javaPlugin, messages), "biome", permissions.SET_BIOME_PERMISSION, messages.COMMAND_SET_BIOME_USAGE, messages.COMMAND_SET_BIOME_DESCRIPTION);
2626
registerExecutor(new SetCustomDataCommand(serviceSupplier, javaPlugin, messages), "customdata", permissions.SET_CUSTOMDATA_PERMISSION, messages.COMMAND_SET_CUSTOMDATA_USAGE, messages.COMMAND_SET_CUSTOMDATA_DESCRIPTION);
27-
registerExecutor(new SetReplaceMaterialCommand(serviceSupplier, javaPlugin, messages), "replacematerial", permissions.SET_REPLACEMATERIAL_PERMISSION, messages.COMMAND_SET_REPLACEMATERIAL_USAGE, messages.COMMAND_SET_REPLACEMATERIAL_DESCRIPTION);
28-
registerExecutor(new SetSelectMaterialCommand(serviceSupplier, javaPlugin, messages), "selectmaterial", permissions.SET_SELECTMATERIAL_PERMISSION, messages.COMMAND_SET_SELECTMATERIAL_USAGE, messages.COMMAND_SET_SELECTMATERIAL_DESCRIPTION);
27+
registerExecutor(new SetReplaceMaterialCommand(serviceSupplier, javaPlugin, messages), "replace-material", permissions.SET_REPLACE_MATERIAL_PERMISSION, messages.COMMAND_SET_REPLACE_MATERIAL_USAGE, messages.COMMAND_SET_REPLACE_MATERIAL_DESCRIPTION);
28+
registerExecutor(new SetSelectMaterialCommand(serviceSupplier, javaPlugin, messages), "select-material", permissions.SET_SELECT_MATERIAL_PERMISSION, messages.COMMAND_SET_SELECT_MATERIAL_USAGE, messages.COMMAND_SET_SELECT_MATERIAL_DESCRIPTION);
2929
registerExecutor(new SetPositionCommand(serviceSupplier, javaPlugin, messages), "position", permissions.SET_POSITION_PERMISSION, messages.COMMAND_SET_POSITION_USAGE, messages.COMMAND_SET_POSITION_DESCRIPTION);
3030

3131
final HelpCommand helpCommand = new HelpCommand(this, new HelpConfigImpl(messages));

custom-ore-generator/src/main/java/de/derfrzocker/custom/ore/generator/command/set/SetReplaceMaterialCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public SetReplaceMaterialCommand(@NotNull final Supplier<CustomOreGeneratorServi
3838
this.messages = messages;
3939
}
4040

41-
@Override //oregen set replacematerial <config_name> <material> <material> ...
41+
@Override //oregen set replace-material <config_name> <material> <material> ...
4242
public boolean onCommand(@NotNull final CommandSender sender, @NotNull final Command command, @NotNull final String label, @NotNull final String[] args) {
4343
if (args.length < 2) {
44-
messages.COMMAND_SET_REPLACEMATERIAL_NOT_ENOUGH_ARGS.sendMessage(sender);
44+
messages.COMMAND_SET_REPLACE_MATERIAL_NOT_ENOUGH_ARGS.sendMessage(sender);
4545
return true;
4646
}
4747

@@ -71,14 +71,14 @@ public boolean onCommand(@NotNull final CommandSender sender, @NotNull final Com
7171
materials.forEach(oreConfig::addReplaceMaterial);
7272

7373
service.saveOreConfig(oreConfig);
74-
messages.COMMAND_SET_REPLACEMATERIAL_SUCCESS.sendMessage(sender);
74+
messages.COMMAND_SET_REPLACE_MATERIAL_SUCCESS.sendMessage(sender);
7575
});
7676

7777
return true;
7878
}
7979

8080
@Nullable
81-
@Override //oregen set replacematerial <config_name> <material> <material> ...
81+
@Override //oregen set replace-material <config_name> <material> <material> ...
8282
public List<String> onTabComplete(@NotNull final CommandSender sender, @NotNull final Command command, @NotNull final String alias, @NotNull final String[] args) {
8383
final List<String> list = new ArrayList<>();
8484
final CustomOreGeneratorService service = serviceSupplier.get();

custom-ore-generator/src/main/java/de/derfrzocker/custom/ore/generator/command/set/SetSelectMaterialCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ public SetSelectMaterialCommand(@NotNull final Supplier<CustomOreGeneratorServic
3838
this.messages = messages;
3939
}
4040

41-
@Override //oregen set replacematerial <config_name> <material> <material> ...
41+
@Override //oregen set select-material <config_name> <material> <material> ...
4242
public boolean onCommand(@NotNull final CommandSender sender, @NotNull final Command command, @NotNull final String label, @NotNull final String[] args) {
4343
if (args.length < 2) {
44-
messages.COMMAND_SET_REPLACEMATERIAL_NOT_ENOUGH_ARGS.sendMessage(sender);
44+
messages.COMMAND_SET_REPLACE_MATERIAL_NOT_ENOUGH_ARGS.sendMessage(sender);
4545
return true;
4646
}
4747

@@ -71,14 +71,14 @@ public boolean onCommand(@NotNull final CommandSender sender, @NotNull final Com
7171
materials.forEach(oreConfig::addSelectMaterial);
7272

7373
service.saveOreConfig(oreConfig);
74-
messages.COMMAND_SET_SELECTMATERIAL_SUCCESS.sendMessage(sender);
74+
messages.COMMAND_SET_SELECT_MATERIAL_SUCCESS.sendMessage(sender);
7575
});
7676

7777
return true;
7878
}
7979

8080
@Nullable
81-
@Override //oregen set material <config_name> <material> <material> ...
81+
@Override //oregen set select-material <config_name> <material> <material> ...
8282
public List<String> onTabComplete(@NotNull final CommandSender sender, @NotNull final Command command, @NotNull final String alias, @NotNull final String[] args) {
8383
final List<String> list = new ArrayList<>();
8484
final CustomOreGeneratorService service = serviceSupplier.get();

custom-ore-generator/src/main/resources/messages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ command:
5555
- "&cuse %%translation:[command.set.biome.usage]%"
5656
success: "&aThe biomes are set successfully!"
5757

58-
replacematerial:
58+
replace-material:
5959
usage: "&f/&doregen set replacematerial <&dore-config&f> <&dmaterial&f> &d..."
6060
description: "Set the material on which the ore should be generate. You can set multiple Materials, by separate them with a space. Materials that are already set to the ore config, gets override."
6161
not-enough-args:
6262
- "&4Wrong amount of arguments!"
6363
- "&cuse %%translation:[command.set.replacmaterial.usage]%"
6464
success: "&aThe materials are set successfully!"
65-
selectmaterial:
65+
select-material:
6666
usage: "&f/&doregen set selectmaterial <&dore-config&f> <&dmaterial&f> &d..."
6767
description: "Set the material which should be the start point for generation. You can set multiple Materials, by separate them with a space. Materials that are already set to the ore config, gets override. If no select Material is set, the replace material will be use instead "
6868
not-enough-args:

custom-ore-generator/src/main/resources/plugin.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ permissions:
3131
custom.ore.gen.set.value: true
3232
custom.ore.gen.set.biome: true
3333
custom.ore.gen.set.customdata: true
34-
custom.ore.gen.set.replacematerial: true
35-
custom.ore.gen.set.selectmaterial: true
34+
custom.ore.gen.set.replace-material: true
35+
custom.ore.gen.set.select-material: true
3636
custom.ore.gen.set.position: true
3737
custom.ore.gen.set:
3838
description: "Base permission of the 'set' subcommand"
@@ -54,12 +54,12 @@ permissions:
5454
default: op
5555
children:
5656
custom.ore.gen.set: true
57-
custom.ore.gen.set.replacematerial:
57+
custom.ore.gen.set.replace-material:
5858
description: "Gives access to the subcommand 'set replacematerial'"
5959
default: op
6060
children:
6161
custom.ore.gen.set: true
62-
custom.ore.gen.set.selectmaterial:
62+
custom.ore.gen.set.select-material:
6363
description: "Gives access to the subcommand 'set selectmaterial'"
6464
default: op
6565
children:

0 commit comments

Comments
 (0)