Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin doesn't load on thermos. #51

Open
DwarfyAssassin opened this issue Feb 8, 2019 · 10 comments
Open

Plugin doesn't load on thermos. #51

DwarfyAssassin opened this issue Feb 8, 2019 · 10 comments

Comments

@DwarfyAssassin
Copy link

DwarfyAssassin commented Feb 8, 2019

DragonTravel version: v01.007.01
Thermos version: Build 56 -1614
Mc version: 1.7.10

The plugin doesn't want to load on startup. Here is the error:

[14:04:07 INFO]: [DragonTravel] Enabling DragonTravel v01.007.01
[14:04:07 WARN]: java.lang.NoSuchFieldException: c
[14:04:07 WARN]:        at java.lang.Class.getDeclaredField(Unknown Source)
[14:04:07 WARN]:        at eu.phiwa.dragontravel.nms.v1_7_R4.EntityRegister.registerEntity(EntityRegister.java:17)
[14:04:07 WARN]:        at eu.phiwa.dragontravel.core.DragonTravel.onEnable(DragonTravel.java:132)
[14:04:07 WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316)
[14:04:07 WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:368)
[14:04:07 WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:410)
[14:04:07 WARN]:        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugin(CraftServer.java:438)
[14:04:07 WARN]:        at org.bukkit.craftbukkit.v1_7_R4.CraftServer.enablePlugins(CraftServer.java:372)
[14:04:07 WARN]:        at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:519)
[14:04:07 WARN]:        at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:493)
[14:04:07 WARN]:        at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:453)
[14:04:07 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:337)
[14:04:07 WARN]:        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:643)
[14:04:07 WARN]:        at java.lang.Thread.run(Unknown Source)

I will see if I can find why it doesn't load in the thermos files. Thermos probably renamed this field.
So thermos uses spigot 1.7.10 which uses 1.7.10-R0.1 and that is 1.7-R0.4 so it should work.

@Phiwa
Copy link
Owner

Phiwa commented Feb 8, 2019

Yeah, that might have renamed the field. -.-
I'm interested in the solution, but currently have no time to look into it.

@DwarfyAssassin
Copy link
Author

DwarfyAssassin commented Feb 9, 2019

So I did some testing with a test plugin and I found out that the fields got renamed.
Here are all the fields:

0.
name: field_151516_b
type: interface org.apache.logging.log4j.Logger
toString: private static final org.apache.logging.log4j.Logger net.minecraft.entity.EntityList.field_151516_b
1.
name: field_75625_b
type: interface java.util.Map
toString: public static java.util.Map net.minecraft.entity.EntityList.field_75625_b
2.
name: field_75626_c
type: interface java.util.Map
toString: public static java.util.Map net.minecraft.entity.EntityList.field_75626_c
3.
name: field_75623_d
type: interface java.util.Map
toString: public static java.util.Map net.minecraft.entity.EntityList.field_75623_d
4.
name: field_75624_e
type: interface java.util.Map
toString: private static java.util.Map net.minecraft.entity.EntityList.field_75624_e
5.
name: field_75622_f
type: interface java.util.Map
toString: private static java.util.Map net.minecraft.entity.EntityList.field_75622_f
6.
name: field_75627_a
type: class java.util.HashMap
toString: public static java.util.HashMap net.minecraft.entity.EntityList.field_75627_a
7.
name: __OBFID
type: class java.lang.String
toString: private static final java.lang.String net.minecraft.entity.EntityList.__OBFID

Here are screenshots of the code and the console:
test
test3

@DwarfyAssassin
Copy link
Author

I will save you some trouble with this piece of code you can test if thermos is installed. I tested it and it works.

try {
    if (Class.forName("thermos.Thermos") != null) {
        //thermos is instaled
    }
} catch (ClassNotFoundException e) {
    //thermos is not instaled
}

@DwarfyAssassin
Copy link
Author

I wasn't able to get the types of the maps and idk if it's possible so this is probably as much as I can help you. If you need any other info I would be glad to help you.

@DwarfyAssassin
Copy link
Author

@Phiwa sorry for the mention but could the info which I have send help?

@Phiwa
Copy link
Owner

Phiwa commented Feb 12, 2019

Yeah, it probably helps with the analysis.
The problem is that I currently do not have the time to upgrade DragonTravel to a version compatible with MC/CB 1.13 , so I'm afraid I will not have the time to support a different platform either... :(
If you (or anyone else) find the time to implement it, feel free to issue a pull request!

@DwarfyAssassin
Copy link
Author

So I am trying to implement it myself so I have cloned and imported the project into eclipse but I get this error about the pom.xml.

Failed to read artifact descriptor for com.massivecraft:factions:jar:2.8.21

And it said that for almost every dependency, I have got the craftbukkit version to work but I haven't been able to fix this. Do you know if anyone could help me with this?

@Phiwa
Copy link
Owner

Phiwa commented Feb 14, 2019 via email

@DwarfyAssassin
Copy link
Author

I made some progress but I got stuck on another problem now. When I compile the plugin it doesn't include command-framework-bukkit and mcstats into the plugin. But it does work for gravitydevelopment.updater.

The difference between the two is that I use a local jar of them while updater is a repo.
Have you had the same problem and do you know if there is a fix for it?

@Phiwa
Copy link
Owner

Phiwa commented Feb 16, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants