Additional gui fixes

This commit is contained in:
Marko Milovanovic 2022-07-23 18:47:19 +02:00
parent 69f6cc12be
commit 5bdfe0929c
4 changed files with 11 additions and 3 deletions

View File

@ -62,7 +62,7 @@
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>8.8.0</version>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>

View File

@ -69,6 +69,7 @@ public class PSHubCore extends JavaPlugin {
// Create ServerCache refreshing task
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.scheduleAtFixedRate(serverCache, 1, getConfig().getInt("cache-time"), TimeUnit.SECONDS);
System.out.println(getConfig().getInt("cache-time"));
}
private void createMultiNodeConfig() throws IOException {

View File

@ -202,6 +202,13 @@ public class GUIUtils {
menu.setButton(0, 4, new SGButton(itemPlayer));
// Fill all empty slots with glass pane
for (int i = 0; i < 9; i++) {
if (menu.getButton(i) == null) {
menu.setButton(i, new SGButton(new ItemBuilder(XMaterial.LIME_STAINED_GLASS_PANE.parseMaterial()).build()));
}
}
Bukkit.getScheduler().runTask(PSHubCore.getInstance(), () -> player.openInventory(menu.getInventory()));
}).start();
}

View File

@ -43,7 +43,7 @@ gui:
player-menu:
item:
enabled: true
name: "&eMy PlayerServers"
name: "&eMy Server"
material: "EMERALD"
location: 8
description:
@ -51,7 +51,7 @@ gui:
- "&7selector or to create your own one"
menu:
name: "&eMy PlayerServers"
name: "&eMy Server"
info:
online:
name: '&a%server%''s server'