Solved JavaDocs.... wrong?

Discussion in 'Plugin Development' started by Monkey_Swag, Oct 4, 2014.

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

    Monkey_Swag

    So in the JavaDocs, you can see that the PlayerMoveEvent class does contain the getFrom() method.
    [​IMG]

    Then when I try to use this method, it won't let me.
    [​IMG]

    Proof that I have the 1.7.9 R0.2 jar file
    [​IMG]

    So what's wrong?
     
  2. Offline

    Rocoty

    Monkey_Swag Well, the PlayerMoveEvent class definitely declares getFrom(). Are you sure you imported it? By the looks of it, the class name in your screenshot is red, indicating that it may not have been imported properly.

    Make sure to solve all compiler errors in order, and not arbitrarily.
     
  3. Offline

    Hawktasard

    I think that's just a theme thing, As ApplicableRegionSet, etc is all red too.
    But yeah, PlayerMoveEvent definitely has a getFrom() method
     
  4. Offline

    Monkey_Swag

  5. Offline

    Gater12

    Monkey_Swag
    IDE getting confused because you named your class PlayerMoveEvent
     
  6. Offline

    Monkey_Swag

    Gater12 OHHH I see what's wrong. Thanks a lot! I normally name my classes like the events names, but without the 'Event' part. I must've derped out this time :p
     
  7. Offline

    Gamecube762

    Monkey_Swag
    Its better to name them as "_____EventHandler" and include multiple events related to the "_____". (ie PlayerEventHandler, BlockEventHandler, EntityEventHandler). This will help keep your code organize and easy to tell what would be inside it.
     
  8. Offline

    Monkey_Swag

    ALso Rocoty that's just a theme, not an error :p
     
Thread Status:
Not open for further replies.

Share This Page