Replace Class FIles

Discussion in 'Plugin Development' started by Dallas, Mar 27, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Dallas

    Hey,
    Is it possible to replace Class files in CraftBukkit in a plugin?
    Like Modifying the BlockIce.java to say what i want in a plugin form?
    Thanks
     
  2. Offline

    Edward Hand

    Not currently, no.
    In some cases you can make a new class that extends a class in the server within your plugin, but that's not always useful.
    What is it you are trying to do? Perhaps there is an alternative.
     
  3. Offline

    Dallas

    In:
    BiomeBase.java

    There is a Class Array:
    protected Class[] s;

    Unfortuantely this is protected.
    I want to add a class file to this array.

    Possible?
    And thanks for the help.
     
  4. Offline

    Edward Hand

  5. Offline

    Dallas

    Oooh nice.
    Will try it out! :p
    Thanks

    Okay i have made good progress.
    However there is 2 problems.
    One the EntityX.class has to be in net.minecraft.server
    This is a sealed package...
    So the only way i have done it is physically inseting the class into it.
    Also Dilemma 2.
    BiomeBase.java is called on sever startup, if this is not modified before startup it will not spawn EntityX.
    Thus modifiying it after startup is futile.
    So i have it working but would rather want it to be all plugin based without CB modification as such.
    Thanks again for the help :)
    ps Sorry for my bad english it is not my first.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
Thread Status:
Not open for further replies.

Share This Page