Craftbukkit question for 1.3

Discussion in 'Plugin Development' started by HockeyMike24, Aug 2, 2012.

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

    HockeyMike24

    There has been something I have been thinking about lately.

    When you destroy a block on a server that you don't have permission for server side the block does not get destroyed, but client side the block gets destroyed and spawned back. Now that there is the adventure mode will it be possible for the protection plugins to make it so that you wont see the block get destroyed client side?
     
  2. Offline

    ZeusAllMighty11

    Adventure mode will not affect the way that blocks respawn client-side.
     
  3. Offline

    Codisimus

    This is what I have been trying to program the last couple days but it seems that you cannot allow certain blocks to be destroyed in adventure mode. So the only way that protection plugins will do wut you asked is if they protect every single block. In other words, I wouldn't count on it.
     
  4. Offline

    ZeusAllMighty11

    There is a way to do it, but it's extensive and pretty useless. Every time a player clicks a block (probably to break it) check if the block type is what you are looking for. If so, set the player gamemode to adventure mode. If not, keep gamemode.
     
  5. Offline

    Codisimus

    doesn't it notify you when your gamemode is changed? if it didn't spam you it might be an option
     
  6. Offline

    ZeusAllMighty11


    You could manually cancel that.
     
  7. Offline

    Codisimus

    so then when would you change the gamemode back?
     
  8. Offline

    marwzoor

    Codisimus
    Maybe you could do a scheduler that waits 1 millisecond and then change back gamemode?
     
  9. Offline

    Codisimus

    When I tried this it acted pretty weird. You could still break blocks. might be due to the dev build of bukkit
     
  10. Offline

    Limeth

    Codisimus
    Or because of lag, don't you think? The player gets the data after a little while.
     
  11. Offline

    Codisimus

    no, in this case it wasn't lag. it would prevent the arm swing animation but everything else acting like survival mode
     
  12. Offline

    Codisimus

    Could you give me a clue on how I would do this?

    There are two things that need to be canceled
    1.) Gamemode message to server log (EDIT: This actually isn't even posted)
    I'm pretty sure I know how to do this and don't see the need to explain it here
    2.) Gamemode message to Player
    No idea how to do this...

    I am open to editing the craftbukkit source but I could not find where this occurs
     
Thread Status:
Not open for further replies.

Share This Page