-4

I want to edit a .class file just to change something from "true" to false. I'm using Eclipse to do so, but I only could find a JBC text editor, which works, but not all the time.

https://dev.bukkit.org/projects/call-duty-zombies

^ I want to edit this plugin for Minecraft, specifically in this directly:

com - theprogrammingturkey - comz - game - managers - PowerUpManager.class

I understand you can decompile this file into a .java file, but after that, how do I even get it back to a .class file so it can be recognizable to read?

Line 65 is what I want to change.

pppery
  • 3,731
  • 22
  • 33
  • 46
Zurovax
  • 5
  • 4
  • 1
    Related, possible dupe: [How to change already compiled .class file without decompile?](https://stackoverflow.com/q/14069082/3750257) – pppery Jun 13 '22 at 03:26

2 Answers2

7

You are likely going to have more luck editing the source code itself. After you do your editing, compile it and do as you wish.

majorsopa
  • 75
  • 9
1

You can use something like Recaf to decompile the .class and patch it on the fly. Since it probably isn't obfuscated, this will most likely not raise issues.

0x150
  • 589
  • 2
  • 11
  • 1
    This is literally what I was asking for, something that keeps the whole .jar file together and allows it to be edited on the fly. Thanks! – Zurovax Jun 14 '22 at 21:49