Gamemode changed Message help

Discussion in 'Plugin Development' started by xKoKSii, Dec 24, 2011.

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

    xKoKSii

    Is it possible to override the default "your gamemode has been changed" message with something else?


    like this. --> event.setJoinMessage


    please help :)
     
  2. Offline

    ItsHarry

    I believe it's impossible
     
  3. Offline

    bergerkiller

    Code:
    getHandle().netServerHandler.sendPacket(new Packet70Bed(3, mode.getValue()));
    In the long run, this causes the message for the player. The message is 100% client-sided unfortunately. But, you can evade that line of code:
    Code:
    Player p = event.getPlayer();
    CraftPlayer cp = (CraftPlayer) p;
    cp.getHandle().itemInWorldManager.a(event.getValue());
    You need to reference CraftBukkit. You also need to monitor the event. (nothing changes to the outcome in the end anyway)

    Only afraid this will cause the client to believe he is still in survival when it changes the creative, thus still seeing the survival inventory.
     
Thread Status:
Not open for further replies.

Share This Page