Jump to content

Recommended Posts

Posted

Hey, guys! So I ran into a small problem :) Here is some code:

On client-side, I am getting "crash-reports" folder like this:

static File path = new File(Minecraft.getMinecraft().mcDataDir, "crash-reports");

I am getting crash-reports path on client-side. And now I need to get crash-reports folder on the server. I found this: 

static File path2 = new File(MinecraftServer.getServer().getDataDirectory(), "crash-reports");

But it says that it is protected. How can I fix/do that right? Thanks a lot in advance!

Posted
5 minutes ago, TheASTRO said:

MinecraftServer.getServer()

? What version are you on? This method has not been static since Mojang changed their threading stuff a while ago...

Please clarify what exactly is protected. The method? The folder?

Posted
Just now, V0idWa1k3r said:

? What version are you on? This method has not been static since Mojang changed their threading stuff a while ago...

Please clarify what exactly is protected. The method? The folder?

The method getDataDirectory() from the type MinecraftServer is not visible

Posted
1 minute ago, diesieben07 said:

Again, what version are you on? And why do you need the crash-reports folder? O.o

Oops, missed the question about the version.  It is 1.7.10 and I `ve created a mod, that scans, analyses and sends some raw data towards PHP. Just for admins to get crashes and fix them :) 

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.