Theguyhere0 / villager-defense-minigame

A Minecraft plugin that adds a fun, customizable minigame where players defend villagers against waves of monsters
GNU General Public License v3.0
7 stars 4 forks source link

Changing the translation for "gems" breaks the game #161

Open UBSMentis opened 1 year ago

UBSMentis commented 1 year ago

Describe the bug A clear and concise description of what the bug is. I translated to German but the Game dosnt starts after the start Timer To Reproduce

de_DE.txt in the Config.yml i change it to de This sets the language file for which plugin notification texts will pull from. locale: de_DE

What can i do? THX and Greets

Server and plugin versions (please complete the following information):

Theguyhere0 commented 1 year ago

Here's what I found:

Other than those points, I really don't see anything else that would be an issue. Can you fix those and let me know if that works? If not, please let me know what errors come up in the console.

UBSMentis commented 1 year ago

yes i use a yml, i must to convert to txt while i cant upload a yml here. I test it and send you a review. THX

UBSMentis commented 1 year ago

so i set the %s placeholder but the same problem, the start timer goes to 0 but the game dont starts. this comes in the console 12:21:51

[VillagerDefense]: Task #55183 for VillagerDefense v1.2.8 generated an exception

Console 12:21:51

java.lang.NumberFormatException: For input string: "ne: ?a415" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?] at java.lang.Integer.parseInt(Integer.java:668) ~[?:?] at java.lang.Integer.parseInt(Integer.java:784) ~[?:?] at me.theguyhere.villagerdefense.plugin.inventories.Inventories.lambda$sort$9(Inventories.java:2538) ~[VillagerDefense-1.2.8.jar:?] at java.util.Comparator.lambda$comparingInt$7b0bb60$1(Comparator.java:494) ~[?:?] at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) ~[?:?] at java.util.TimSort.sort(TimSort.java:220) ~[?:?] at java.util.Arrays.sort(Arrays.java:1307) ~[?:?] at java.util.ArrayList.sort(ArrayList.java:1721) ~[?:?] at me.theguyhere.villagerdefense.plugin.inventories.Inventories.sort(Inventories.java:2535) ~[VillagerDefense-1.2.8.jar:?] at me.theguyhere.villagerdefense.plugin.inventories.Inventories.createWeaponShopMenu(Inventories.java:1475) ~[VillagerDefense-1.2.8.jar:?] at me.theguyhere.villagerdefense.plugin.game.models.Tasks$8.run(Tasks.java:289) ~[VillagerDefense-1.2.8.jar:?] at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.19.2.jar:git-Paper-307] at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.19.2.jar:git-Paper-307] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1473) ~[paper-1.19.2.jar:git-Paper-307] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:446) ~[paper-1.19.2.jar:git-Paper-307] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1397) ~[paper-1.19.2.jar:git-Paper-307] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1173) ~[paper-1.19.2.jar:git-Paper-307] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:305) ~[paper-1.19.2.jar:git-Paper-307] at java.lang.Thread.run(Thread.java:833) ~[?:?]

The game starts with Translate only to this Desktop Screenshot 2023 07 05 - 13 33 03 681 - Kopie

Normaly is that normal

UBSMentis commented 1 year ago

ok i found the problem :) when i Translate line 428 gems: "Gems" to gems: "Edelsteine" then comes the Error in the console. Translate is now Ready and funktiunally. THX

Theguyhere0 commented 1 year ago

Ah, okay yeah then I think I know what's happening. In v2 I changed querying price from the lore to metadata stored inside the item, so in these versions they depend on the actual lore. Probably won't change fix this here since I plan on moving everything to v2 eventually, but I'll keep this open until it's fixed.

UBSMentis commented 1 year ago

INFO maybe its good t know, the playerData.yml will not updatet automaticly after translation. all Kits will loss, because it is still in English in the file. this must be edited manually. only then will everyone have their things back

UBSMentis commented 1 year ago

UPDATE! Probelm with the line 506-510 carePackages (when translatet, package drops or buys in the shop impossible) Line 233 - 252 Enchants (when Translated, enchants impossible)

Theguyhere0 commented 1 year ago

I'll look into those as well and maybe create a separate bug report to track those. I may have fixed them in the v2, but I'll see if I want to fix it in v1. thanks for the updates!