Private variable - possible to change?

Discussion in 'Plugin Development' started by Fifteen, Jan 15, 2011.

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


    So, trying to make a /mspawn command via net.minecraft.server, this is the code that changes what the spawner spawns:

    TileEntityMobSpawner mspawner = new TileEntityMobSpawner();
    mspawner.h = messagesplit[1];
    (this is only part of the code)

    However, mspawner.h (TileEntityMobSpawner.h) is a private variable, so I can't change it. Is there any way around this?


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jan 8, 2016
  2. Offline


    To my knowledge, it has to be made public unless there is some method there which edits the private for you.

    You could ask them to add that as a feature if it's not there. I see them add new things every day.
  3. Offline


    Hm, I guess, since there is no such method in that class.
Thread Status:
Not open for further replies.

Share This Page