Skip to content

Commit 762bb44

Browse files
committed
Fixed sendMessage error for split string
1 parent 8b71ac2 commit 762bb44

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

demo/src/main/resources/commands/GiveItem.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def run = { CommandSender sender, String label, String[] args ->
3030
} catch (NumberFormatException ignored) {
3131
// auto-generated code
3232
} catch (IndexOutOfBoundsException ignored) {
33-
sender.sendMessage('Usage: /giveitem <material> <amount> <durability> <name> ' +
34-
'<lore> <enchantments> <item-flags> <unbreakable> <custom-model-data>')
33+
// Groovy does not like separations
34+
sender.sendMessage('Usage: /giveitem <material> <amount> <durability> <name> <lore> <enchantments> <item-flags> <unbreakable> <custom-model-data>')
3535
sender.sendMessage('At least material is required!')
3636
}
3737
else sender.sendMessage('Console cannot execute this command!')

demo/src/main/resources/commands/GivePersistentItem.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def run = { CommandSender sender, String label, String[] args ->
3434
} catch (NumberFormatException ignored) {
3535
// auto-generated code
3636
} catch (IndexOutOfBoundsException ignored) {
37-
sender.sendMessage('Usage: /givepersistentitem <death-action> <mobility> <material> <amount> ' +
38-
'<durability> <name> <lore> <enchantments> <item-flags> <unbreakable> <custom-model-data>')
37+
// Groovy does not like separations
38+
sender.sendMessage('Usage: /givepersistentitem <death-action> <mobility> <material> <amount> <durability> <name> <lore> <enchantments> <item-flags> <unbreakable> <custom-model-data>')
3939
sender.sendMessage('At least death-action, mobility and material are required!')
4040
}
4141
else sender.sendMessage('Console cannot execute this command!')

0 commit comments

Comments
 (0)