mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-07 11:10:05 +01:00
Replace ( and ) by ~ in /ncp version. Just BLOCKSMC1_4, no (base).
Doesn't look better ingame/console, but might on GitHub.
This commit is contained in:
parent
0a32d55039
commit
e278e01a3c
@ -43,18 +43,18 @@ public class VersionCommand extends BaseCommand{
|
||||
lines.addAll(Arrays.asList(new String[]{
|
||||
"---- Version information ----",
|
||||
"#### Server ####",
|
||||
Bukkit.getServer().getVersion(),
|
||||
"(detected: " + ServerVersion.getMinecraftVersion() + ")",
|
||||
alt(Bukkit.getServer().getVersion()),
|
||||
" detected: " + alt(ServerVersion.getMinecraftVersion()),
|
||||
"#### NoCheatPlus ####",
|
||||
"Plugin: " + Bukkit.getPluginManager().getPlugin("NoCheatPlus").getDescription().getVersion(),
|
||||
"MCAccess: " + mcAccess.getMCVersion() + " / " + mcAccess.getServerVersionTag(),
|
||||
"Plugin: " + alt(Bukkit.getPluginManager().getPlugin("NoCheatPlus").getDescription().getVersion()),
|
||||
"MCAccess: " + alt(mcAccess.getMCVersion() + " / " + mcAccess.getServerVersionTag()),
|
||||
}));
|
||||
final Map<String, Set<String>> featureTags = NCPAPIProvider.getNoCheatPlusAPI().getAllFeatureTags();
|
||||
if (!featureTags.isEmpty()) {
|
||||
final List<String> features = new LinkedList<String>();
|
||||
// Add present features.
|
||||
for (final Entry<String, Set<String>> entry : featureTags.entrySet()) {
|
||||
features.add(" " + entry.getKey() + ": " + StringUtil.join(entry.getValue(), " | "));
|
||||
features.add(alt(" " + entry.getKey() + ": " + StringUtil.join(entry.getValue(), " | ")));
|
||||
}
|
||||
// Sort and add.
|
||||
Collections.sort(features, String.CASE_INSENSITIVE_ORDER);
|
||||
@ -65,7 +65,7 @@ public class VersionCommand extends BaseCommand{
|
||||
if (!hooks.isEmpty()){
|
||||
final List<String> fullNames = new LinkedList<String>();
|
||||
for (final NCPHook hook : hooks){
|
||||
fullNames.add(hook.getHookName() + " " + hook.getHookVersion());
|
||||
fullNames.add(alt(hook.getHookName() + " " + hook.getHookVersion()));
|
||||
}
|
||||
Collections.sort(fullNames, String.CASE_INSENSITIVE_ORDER);
|
||||
lines.add("Hooks: " + StringUtil.join(fullNames, " | "));
|
||||
@ -74,7 +74,7 @@ public class VersionCommand extends BaseCommand{
|
||||
for (final String name : new String[]{"CompatNoCheatPlus", "ProtocolLib"}) {
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin(name);
|
||||
if (plugin != null) {
|
||||
relatedPlugins.add(plugin.getDescription().getFullName());
|
||||
relatedPlugins.add(alt(plugin.getDescription().getFullName()));
|
||||
}
|
||||
}
|
||||
if (!relatedPlugins.isEmpty()) {
|
||||
@ -83,5 +83,9 @@ public class VersionCommand extends BaseCommand{
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
||||
private static String alt(String x) {
|
||||
return x.replace('(', '~').replace(')', '~');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ public class BlockProperties {
|
||||
try{
|
||||
initTools(mcAccess, worldConfigProvider);
|
||||
initBlocks(mcAccess, worldConfigProvider);
|
||||
blocksFeatures.add("BlocksMC1_4(base)");
|
||||
blocksFeatures.add("BlocksMC1_4");
|
||||
// Extra hand picked setups.
|
||||
try{
|
||||
blocksFeatures.addAll(new VanillaBlocksFactory().setupVanillaBlocks(worldConfigProvider));
|
||||
|
Loading…
Reference in New Issue
Block a user