Skip to content

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975 #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 10, 2014
Merged

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975 #53

merged 6 commits into from
Apr 10, 2014

Conversation

fragtastic
Copy link
Contributor

Method getCaught() actually returns an Item as Entity if fishing successful, not null.

Method getCaught() actually returns an Item as Entity if fishing successful, not null.
@Wolvereness
Copy link
Contributor

This doesn't follow proper formatting. A <p> tag should be used before secondary statements. A blank line should be maintained before the annotations. Lines should be wrapped to 78 characters (79th being \n).

@Wolvereness Wolvereness closed this Dec 2, 2013
@Wolvereness Wolvereness reopened this Dec 2, 2013
Method getCaught() returns an Item as Entity if fishing successful, not null
*
* @return Entity caught by the player, null if fishing, bobber has gotten stuck in the ground or nothing has been caught
* <p>
* If player has fished successfully, the result may be cast to {@link Item}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need a line break here.

Method getCaught() returns an Item as Entity if fishing successful, not null
@aerouk
Copy link
Contributor

aerouk commented Dec 2, 2013

Also, on line 43, you need to get rid of the space after the * symbol.

Method getCaught() returns an Item as Entity if fishing successful, not null
@Wolvereness
Copy link
Contributor

This needs to be updated to the latest master.

Could you also provide proof for the behavior defined? Links to craftbukkit should suffice.

/edit: And at least make a comment indicating that it has been updated, for alert reasons.

@fragtastic
Copy link
Contributor Author

Proof.
https://github.com/Bukkit/CraftBukkit/blob/master/src/main/java/net/minecraft/server/EntityFishingHook.java

Lines 390 & 392.
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY, this.locZ, this.f());

PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), entityitem.getBukkitEntity(), (Fish) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH);

@aerouk
Copy link
Contributor

aerouk commented Dec 13, 2013

The doc on line 44 exceeds 78 characters.

Split line 44
*
* @return Entity caught by the player, null if fishing, bobber has gotten
* stuck in the ground or nothing has been caught
* @return Entity caught by the player, Entity if fishing, and null if bobber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line still exceeds the 78 character limit.

@aerouk aerouk mentioned this pull request Apr 10, 2014
Wolvereness added a commit that referenced this pull request Apr 10, 2014
Thanks @fragtastic, @aerouk

commit 9631a66
Author: aerouk
Date:   2014-04-10 22:53:53 +0100

Fixed up #53

commit 493bd85
Author: frag
Date:   2013-12-13 12:24:45 -0800

Fixed doc length

Split line 44

commit 0597b7d
Author: fragtastic
Date:   2013-12-13 01:45:33 -0800

Merged with upstream

commit 1dcd22b
Author: frag
Date:   2013-12-02 16:24:15 -0800

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975

Method getCaught() returns an Item as Entity if fishing successful, not null

commit 0bb0369
Author: frag
Date:   2013-12-02 08:30:18 -0800

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975

Method getCaught() returns an Item as Entity if fishing successful, not null

commit 1eb1346
Author: frag
Date:   2013-12-01 21:28:28 -0800

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975

Method getCaught() returns an Item as Entity if fishing successful, not null

commit 9be1783
Author: frag
Date:   2013-12-01 14:49:47 -0800

Fixed PlayerFishEvent documentation. Fixes BUKKIT-4975

Method getCaught() actually returns an Item as Entity if fishing successful, not null.
@Wolvereness Wolvereness merged commit 493bd85 into Bukkit:master Apr 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants