Adds the ability to use \_ as a replacement for spaces between words in the description

This commit is contained in:
2022-07-10 15:26:20 +02:00
parent a3f235fbf0
commit e32e37b246
2 changed files with 5 additions and 4 deletions

View File

@ -57,7 +57,7 @@ public class CreateCommand implements CommandExecutor {
*/
private PermissionSign parseSign(@NotNull CommandSender sender, @NotNull String[] args) {
String name = args[0];
String description = args[1];
String description = args[1].replaceAll("\\\\_", " ");
String[] permissions = args[2].replaceAll("\\?", " ").split(",");
for (String permission : permissions) {
if (permission.contains(":")) {