Settings Players Weather/Time?

Discussion in 'Plugin Development' started by Aephout14, Feb 3, 2015.

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

    Aephout14

    How would i set a Players Weather and Time, Any code snippets or Bukkit Documentation? Thanks in Advance.
     
  2. Offline

    sirrus86

    For all players, World.setStorm(boolean), World.setThundering(boolean), and World.setTime(long).

    For just one player, packets.
     
  3. Offline

    Aephout14

    @sirrus86 Packets, Mind giving me info on how to do that, Documentation anything, I am making a gui that lets you set weather and stuff.
     
  4. Offline

    sirrus86

    Packets are relatively advanced if you're new to this. I'd recommend looking up a plugin called ProtocolLib, it will help you immensely.
     
  5. Offline

    Aephout14

    @sirrus86 I try to do this World.setTime(1000); setTime is errored, It wants me to change it to setDayTime, When i do, The whole thing is an error.
     
  6. Offline

    TGRHavoc

    teej107 likes this.
  7. Offline

    Aephout14

    @TGRHavoc Thanks for the Link, Reading it now!

    @TGRHavoc I have no idea.

    EDIT:the Method setTime(int) is undefined for the type World

    EDIT by Timtower: merged posts
     
    Last edited by a moderator: Feb 3, 2015
  8. Offline

    teej107

    @The_FrosTy_Clan It's not a static method. You need an instance of a World!
     
    TGRHavoc likes this.
  9. Offline

    RainoBoy97

    Player#setPlayerTime
     
    1Rogue likes this.
  10. Offline

    SuperOriginal

    Nobody needs to use packets for personal time/weather if anyone bothered looking at the Player class documentation...
    Player#setPlayerTime
    Player#setPlayerWeather
     
    teej107 and 1Rogue like this.
Thread Status:
Not open for further replies.

Share This Page