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
+7 -2

No files matched your search

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