1.0.3a SNAPSHOT HOTFIX

Fixes for clear spigot
This commit is contained in:
redtea committed 2023-08-10 14:06:53 +03:00
1 parent c270c8b45d
commit ac8744c0f3
4 files changed
+16 -11

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ plugins {
}
group = 'me.redtea'
version = '1.0.3-SNAPSHOT'
version = '1.0.3a-SNAPSHOT'
repositories {
mavenCentral()
@@ -25,15 +25,18 @@ public class FoliaSupporter {
@SneakyThrows
public void run(RespawnService respawnService, Plugin plugin) {
String version = ((JsonObject) new JsonParser().parse(new FileReader("version_history.json"))).get("currentVersion").getAsString();
if(!version.toLowerCase().contains("folia") && !plugin.getConfig().getBoolean("forceUseFoliaPatches")) {
return;
}
runningOnFolia = true;
plugin.getLogger().info("Found Folia! Applying patches for this...");
this.respawnService = respawnService;
Bukkit.getPluginManager().registerEvents(new FoliaDeathListener(), plugin);
plugin.getLogger().info("Patches for Folia successfully applied!");
try {
String version = ((JsonObject) new JsonParser().parse(new FileReader("version_history.json"))).get("currentVersion").getAsString();
if(!version.toLowerCase().contains("folia") && !plugin.getConfig().getBoolean("forceUseFoliaPatches")) {
return;
}
runningOnFolia = true;
plugin.getLogger().info("Found Folia! Applying patches for this...");
this.respawnService = respawnService;
Bukkit.getPluginManager().registerEvents(new FoliaDeathListener(), plugin);
plugin.getLogger().info("Patches for Folia successfully applied!");
} catch (Throwable ignored) {}
}
@@ -5,6 +5,7 @@ import lombok.RequiredArgsConstructor;
import me.redtea.nodropx.libs.carcadex.repo.MutableRepo;
import me.redtea.nodropx.libs.message.container.Messages;
import me.redtea.nodropx.menu.CachedMenu;
import me.redtea.nodropx.util.MD5ColorUtils;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
@@ -25,7 +26,7 @@ public class SinglePageGui implements CachedMenu {
player.openInventory(cache.get(player.getUniqueId()));
return;
}
Inventory gui = Bukkit.createInventory(null, 54, messages.get("gui.personalStorage.title").asComponent());
Inventory gui = Bukkit.createInventory(null, 54, MD5ColorUtils.translateHexColorCodes(messages.get("gui.personalStorage.title").asUnparsedString()));
for(ItemStack item : personalStorageRepo.get(player.getUniqueId()).orElse(new ArrayList<>())) if(item != null) gui.addItem(item);
cache.put(player.getUniqueId(), gui);
+1
View File
@@ -6,5 +6,6 @@ checkForUpdates: true
confirmThrowNoDropItem: true
#Single did not supports minimessages!
#Can be SINGLE_PAGE or MULTI_PAGES
personalStorageType: SINGLE_PAGE