Resolved missing placeholders for plugin tabs

Affects issues:
- Fixed #1376
This commit is contained in:
Risto Lahtela 2020-03-28 13:03:17 +02:00
parent 45d6bfb840
commit 2b0fa41963
3 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,9 @@ public class NetworkPage implements Page {
String tabs = JSONCache.getOrCacheString(DataID.EXTENSION_TABS, serverUUID, () -> pluginTabs.get().getTabs());
PlaceholderReplacer pluginPlaceholders = new PlaceholderReplacer();
pluginPlaceholders.put("networkDisplayName", config.get(ProxySettings.NETWORK_NAME));
pluginPlaceholders.put("serverName", config.get(ProxySettings.NETWORK_NAME));
pluginPlaceholders.put("serverUUID", serverUUID.toString());
pluginPlaceholders.put("navPluginsTabs", nav);
pluginPlaceholders.put("tabsPlugins", StringUtils.remove(tabs, "${backButton}"));

View File

@ -109,6 +109,7 @@ public class PlayerPage implements Page {
placeholders = new PlaceholderReplacer();
PlayerPluginTab pluginTabs = pageFactory.inspectPluginTabs(playerUUID);
placeholders.put("playerName", playerName);
placeholders.put("backButton", (serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK : Html.BACK_BUTTON_SERVER).create());
placeholders.put("navPluginsTabs", pluginTabs.getNav());
placeholders.put("pluginsTabs", pluginTabs.getTab());

View File

@ -101,6 +101,9 @@ public class ServerPage implements Page {
String tabs = JSONCache.getOrCacheString(DataID.EXTENSION_TABS, serverUUID, () -> pluginTabs.get().getTabs());
PlaceholderReplacer pluginPlaceholders = new PlaceholderReplacer();
pluginPlaceholders.put("serverUUID", serverUUID.toString());
pluginPlaceholders.put("serverName", server.getIdentifiableName());
pluginPlaceholders.put("serverDisplayName", server.getName());
pluginPlaceholders.put("backButton", serverInfo.getServer().isProxy() ? Html.BACK_BUTTON_NETWORK.create() : "");
pluginPlaceholders.put("navPluginsTabs", nav);
pluginPlaceholders.put("tabsPlugins", tabs);