GithubHelp home page GithubHelp logo

Comments (16)

Plajer avatar Plajer commented on July 25, 2024 1

Okay migrator fixed in 0124d6d commit. If you want to get pre release 2.1.4 jar contact me at discord https://discord.gg/UXzUdTP / Plajer#7013
I'll help you with migration then.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Try to backup your language file and generate new. Then tell us if error does occur again.

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

I've backuped all the files and removed the ones in the folder and the first time the following error occurred:

[22:25:53] [Server thread/INFO]: [VillageDefense] Enabling VillageDefense v2.1.3
[22:25:53] [Server thread/INFO]: [VillageDefense] Creating signModification.yml because it does not exist!
[22:25:53] [Server thread/INFO]: [VillageDefense] Creating kits.yml because it does not exist!
[22:25:54] [Server thread/ERROR]: Error occurred while enabling VillageDefense v2.1.3 (Is it up to date?)
java.lang.NullPointerException
	at me.tomthedeveloper.handlers.RewardsHandler.<init>(RewardsHandler.java:47) ~[?:?]
	at me.tomthedeveloper.Main.setupGameKits(Main.java:801) ~[?:?]
	at me.tomthedeveloper.Main.onEnable(Main.java:235) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-e4d4710-e1ebe52]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_151]

I've restarted the server and it seems it have finished creating the files without problem:

[22:30:04 INFO]: [VillageDefense] Enabling VillageDefense v2.1.3
[22:30:04 INFO]: [VillageDefense] Creating SpecialItems.yml because it does not exist!
[22:30:04 INFO]: [VillageDefense] Creating bungee.yml because it does not exist!

But in this moment I'm not able to test if ingame everything works well.

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

But thinking in the errors, we can see two more bugs:

  • Problem migrating from the old version
  • Problem creating a file (if not wrong kits.yml) on first startup

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Gonna check it tomorrow.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Your second report about file creating

[22:25:53] [Server thread/INFO]: [VillageDefense] Creating signModification.yml because it does not exist!
[22:25:53] [Server thread/INFO]: [VillageDefense] Creating kits.yml because it does not exist!
[22:25:54] [Server thread/ERROR]: Error occurred while enabling VillageDefense v2.1.3 (Is it up to date?)
java.lang.NullPointerException...

has been fixed in f92dec7 commit.
Still investigating first error. Have you still got old messages files to show it?
SpgiotMC update with this fix will be after @TomtheCreator fix 1.8.8 mobs #28 issue

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

I've got the files, but when I was revising the upgraded file, I've seen that File-Version continue being = 1. Then I've revised the code in LanguageMigrator.java and I've seen that a line of code at the end of the conversion process (just before saving) is LanguageManager.getLanguageFile().set("File-Version", 1); (line 67), and, as I can understand, it's setting the File-Version integrer to 1, the old version. Maybe that is what is causing the problem (not yet tested).

Also, some of the messages aren't migrated. I've got some duplicates in the starting of the file that when I revised inside the file they were like "MESSAGE NOT FOUND...". They were exactly:

  • Seconds-Left-Until-Game-Starts
  • The-Game-Has-Started
  • You're-Back-In-Game
  • orbs-In-Shop
  • GAMENAME
  • PREFIX (this have been duplicated with the default value as In-Game.Plugin-Prefix, due to line 66)
  • Need-More-Orbs-To-Buy-This
  • Admin-ForceStart-Game

There were some more (almost all about "You are spectator so you can't use the ability") that were also "MESSAGE NOT FOUND...", but they fully disappeared of the file, and I can't remember them.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Migrator is proccessing all old messages and match it with the new ones. Every message that isn't found is not set (is null) and then migrator replace all missing messages with "MESSAGE NOT FOUND! Either fill this one in yourself or delete this file to create a entire new one!" string and then File-Version: "1" is added to block the file migration next time.
Everything works fine there.
The problem is that the messages aren't found at the server start however they're migrated before plugin setup.

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

But File-Version might be 2, isn't it? (language.yml line 192)

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Ooh it was my mistake when i was trying to do language file updater. It should be 1 not 2.
Sorry for misguide.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

However it won't occur that problem since migrator is checking only for file version = 0 || null

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

Ok, but when I listed some messages I was saying that I had them in my file but when I upgraded it they stood in the starting of the file and the messages created by the migrator were empty. I'm saying that it didn't detected them.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Can you show me this file please?

from village_defense_2.0.

altrisi avatar altrisi commented on July 25, 2024

Files: https://gist.github.com/altrisi/bf3f6d65f0213ca32f7766fba186c097

Note: In the migrated file, I've added the missing messages and single quotes to every message (trying to get the file working).
Also, the first 8 lines are what I'm saying that haven't been migrated.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Okay according to your message

I've got the files, but when I was revising the upgraded file, I've seen that File-Version continue being = 1. Then I've revised the code in LanguageMigrator.java and I've seen that a line of code at the end of the conversion process (just before saving) is LanguageManager.getLanguageFile().set("File-Version", 1); (line 67), and, as I can understand, it's setting the File-Version integrer to 1, the old version. Maybe that is what is causing the problem (not yet tested).
Also, some of the messages aren't migrated. I've got some duplicates in the starting of the file that when I revised inside the file they were like "MESSAGE NOT FOUND...". They were exactly:
Seconds-Left-Until-Game-Starts
The-Game-Has-Started
You're-Back-In-Game
orbs-In-Shop
GAMENAME
PREFIX (this have been duplicated with the default value as In-Game.Plugin-Prefix, due to line 66)
Need-More-Orbs-To-Buy-This
Admin-ForceStart-Game
There were some more (almost all about "You are spectator so you can't use the ability") that were also "MESSAGE NOT FOUND...", but they fully disappeared of the file, and I can't remember them.

I've found some bugs in migrator and i've fixed it. I need to still look for other messages that are wrongly migrated. Thanks for this report.

from village_defense_2.0.

Plajer avatar Plajer commented on July 25, 2024

Everything done in abe7081.
Issue closed.

from village_defense_2.0.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.