Solved Experience orb float around players?

Discussion in 'Plugin Development' started by TigerHix, Aug 9, 2013.

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

    TigerHix

    I remember that in beta version of Minecraft, if your level is too high, and you enclose some experience orbs, they will float around you.

    Could I create the same effect on Bukkit?
     
  2. Offline

    newboyhun

    TigerHix

    Code:
    CraftPlayer craft = (CraftPlayer) e.getPlayer();
    EntityPlayer entity = (EntityPlayer) craft.getHandle();
    entity.bV = 10; // cooldown for picking up experience orb
     
  3. Offline

    TigerHix

    newboyhun
    bV has private access.. :( How can I solve it? Thanks!
     
  4. Offline

    newboyhun

    TigerHix
    Class c = entity.getClass();
    Field f = c.getDeclaredField("bV");
    f.setAccessible(true);
    f.setDouble(entity, 10);

    TigerHix
    Oops bad field sorry.
    entity.bv = 10;
    bv is public

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  5. Offline

    TigerHix

    Yea, I just found that too :p

    Thanks for your help! :D
     
  6. Offline

    newboyhun

    TigerHix
    Change the thread to SOLVED please.
     
Thread Status:
Not open for further replies.

Share This Page