diff --git a/pom.xml b/pom.xml
index 267b4cd..5297322 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
ru.simsonic
rscPermissions
- 0.10.7b-SNAPSHOT
+ 0.10.7b
jar
rscPermissions
diff --git a/src/main/java/ru/simsonic/rscPermissions/Bukkit/Commands/CommandEntity.java b/src/main/java/ru/simsonic/rscPermissions/Bukkit/Commands/CommandEntity.java
index 05cc478..4abc49c 100644
--- a/src/main/java/ru/simsonic/rscPermissions/Bukkit/Commands/CommandEntity.java
+++ b/src/main/java/ru/simsonic/rscPermissions/Bukkit/Commands/CommandEntity.java
@@ -49,32 +49,35 @@ public class CommandEntity
}
public List getHelpForType(TargetType type)
{
- final List answer = new ArrayList<>(16);
- final String typeName = type.name().toLowerCase();
+ final List templt = new ArrayList<>(20);
switch(type)
{
case GROUP:
case USER:
- answer.add(String.format("{_YL}/rscp %s [new] listgroups {_LS}- show list of parent groups", typeName));
- answer.add(String.format("{_YL}/rscp %s [new] listpermissions {_LS}- show list of explicit permissions", typeName));
- answer.add(String.format("{_YL}/rscp %s [new] prefix {_LS}- view %s's prefix", typeName, typeName));
- answer.add(String.format("{_YL}/rscp %s [new] suffix {_LS}- view %s's suffix", typeName, typeName));
- answer.add(String.format("{_YL}/rscp %s [new] addgroup [options]", typeName));
- answer.add(String.format("{_YL}/rscp %s [new] addpermission <[-]perm> [options]", typeName));
- answer.add(String.format("{_YL}/rscp %s [new] removegroup ", typeName));
- answer.add(String.format("{_YL}/rscp %s [new] removepermission ", typeName));
- answer.add(String.format("{_YL}[options] {_LS}can be:"));
- answer.add(String.format("{_LS}1. {_WH}destination {_LS} -- it is destination, yes."));
- answer.add(String.format("{_LS}2. {_WH}expirience {_LS} -- NOT WORKING."));
- answer.add(String.format("{_LS}3. {_WH}lifitime !?> {_LS} -- NOT READY, will be like '1hours12min30s'."));
+ templt.add("{_YL}/rscp {:T} [new] listgroups {_LS}- show list of parent groups");
+ templt.add("{_YL}/rscp {:T} [new] listpermissions {_LS}- show list of explicit permissions");
+ templt.add("{_YL}/rscp {:T} [new] prefix {_LS}- view prefix");
+ templt.add("{_YL}/rscp {:T} [new] suffix {_LS}- view suffix");
+ templt.add("{_YL}/rscp {:T} [new] addgroup [options]");
+ templt.add("{_YL}/rscp {:T} [new] addpermission <[-]perm> [options]");
+ templt.add("{_YL}/rscp {:T} [new] removegroup ");
+ templt.add("{_YL}/rscp {:T} [new] removepermission ");
+ templt.add("{_YL}[options] {_LS}can be:");
+ templt.add("{_LS}1. {_WH}destination {_LS} -- it is destination, yes.");
+ templt.add("{_LS}2. {_WH}expirience {_LS} -- NOT WORKING.");
+ templt.add("{_LS}3. {_WH}lifitime !?> {_LS} -- NOT READY, will be like '1hours12min30s'.");
break;
case PLAYER:
- answer.add(String.format("{_YL}/rscp %s listgroups {_LS}- show resulting inheritance tree", typeName));
- answer.add(String.format("{_YL}/rscp %s listpermissions {_LS}- show final calculated permissions", typeName));
- answer.add(String.format("{_YL}/rscp %s prefix {_LS}- show %s's prefix", typeName, typeName));
- answer.add(String.format("{_YL}/rscp %s suffix {_LS}- show %s's suffix", typeName, typeName));
+ templt.add("{_YL}/rscp {:T} listgroups {_LS}- show resulting inheritance tree");
+ templt.add("{_YL}/rscp {:T} listpermissions {_LS}- show final calculated permissions");
+ templt.add("{_YL}/rscp {:T} prefix {_LS}- show {:T}'s prefix");
+ templt.add("{_YL}/rscp {:T} suffix {_LS}- show {:T}'s suffix");
break;
}
+ final List answer = new ArrayList<>(20);
+ final String typeId = type.name().toLowerCase();
+ for(String line : templt)
+ answer.add(line.replace("{:T}", typeId));
return answer;
}
public void onEntityCommandHub(CommandSender sender, TargetType type, String[] args) throws CommandAnswerException