Scoreboard and keys support

Discussion in 'Plugin Development' started by wiedzmin137, Sep 27, 2013.

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

    wiedzmin137

    Hello. I want to ask is there possibility to input some keys (another that WASD, Shift or whatever else writed on user settings) to server (maybe using java, not Bukkit, methods)? If not, how I can "open" Scoreboard on using shift, how changing his content on using mouse wheel? Thanks.
     
  2. Offline

    The_Doctor_123

    Key inputs, other than the ones that actually matter to the server, do not get sent to the server. Alternatively, you can check the ones that do. Shift would be checking if a player is sneaking(ToggleSneakEvent?) and WASD would be checking if the player is moving(PlayerMoveEvent). You'd have to do some math, though, to check what key they pressed.
     
    wiedzmin137 likes this.
  3. Offline

    wiedzmin137

    Thanks. Now I wait for rest of my asks.
     
  4. Offline

    Xx_LeetGamer_xX

    For the mouse wheel you can listen to the PlayerItemHeldEvent, but note that its also called when a player typed 1 - 9 and as far as I know there's no way around this.
     
  5. Offline

    Loogeh

    PlayerDropItemEvent would sometimes be Q, but not always. (If they dropped it via inventory)
     
  6. Offline

    Xx_LeetGamer_xX

    Not sure if this interests you, but on the topic of controls: You can have the PlayerToggleFlightEvent listen for a double tap on the space bar if you set their flying to true before hand and then cancel it after they try and fly.
     
  7. Offline

    wiedzmin137

    leetgamer Flight not intrest me, but your first post - yes. Maybe someone know something about scoreboard?
     
  8. Offline

    Xx_LeetGamer_xX

    I posted about how to detect the mouse wheel already, use the input from the event to edit the scoreboard how you want.
     
Thread Status:
Not open for further replies.

Share This Page