DragonTravel

DragonTravel

348k Downloads

Plugin doesn't load on thermos.

DwarfyAssassin opened this issue · 10 comments

commented

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.

commented

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

commented

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
}
commented

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.

commented

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

commented

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

commented

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!

commented

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?

commented
commented

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?

commented