Skip to content
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.

[API, FIXED] Get Player's SkillPoints #6

Open
zThana opened this issue Nov 1, 2016 · 11 comments
Open

[API, FIXED] Get Player's SkillPoints #6

zThana opened this issue Nov 1, 2016 · 11 comments

Comments

@zThana
Copy link

zThana commented Nov 1, 2016

Heey,

I'm trying to get the amount of sp a certain player has, but I have no clue how I'd do that using the API.

Could you help me out, please? ;P

  • Pr0totype2
@zThana zThana changed the title [API] Get Player's SkillPoints [API, FIXED] Get Player's SkillPoints Nov 1, 2016
@zThana zThana closed this as completed Nov 1, 2016
@NathanWolf
Copy link
Member

Does that mean you figured it out? 👍

@zThana
Copy link
Author

zThana commented Nov 1, 2016

Kinda.. I found the method but it isn't showing me any numbers...

@zThana zThana reopened this Nov 1, 2016
@NathanWolf
Copy link
Member

Yeah it should just be Mage.getSkillPoints, it would at least show zero. In-game you should see the amount as your XP level while holding a wand.

@zThana
Copy link
Author

zThana commented Nov 1, 2016

Not true. It doesn't return anything on my scoreboard, just leaves it empty.

@NathanWolf
Copy link
Member

Not the scoreboard, the XP display- the number above your XP bar (mana bar while holding a wand). Magic doesn't use the scoreboard at all.

It should be there unless you've turned off SP or the SP display in your configs.

@zThana
Copy link
Author

zThana commented Nov 1, 2016

I've used the API to receive the amount of SP a player has, but it doesn't show up on the scoreboard, it simply returns nothing.

@NathanWolf
Copy link
Member

What I am suggesting is that you look at your XP level while holding a wand to make sure you actually have some SP. If it shows zero, then you have zero SP and I'd expect that's what the API will return as well.

The API returns an int, so by "nothing" I'm assuming you mean "0" as it's literally impossible for that method to return nothing.

@zThana
Copy link
Author

zThana commented Nov 1, 2016

It's actually empty, nothing shows up

@NathanWolf
Copy link
Member

I think you must be doing something wrong in the scoreboard display then... Mage.getSkillPoints returns an int, there's no way for it to be empty. An int will always be something, even if it's zero.

@zThana
Copy link
Author

zThana commented Nov 1, 2016

I understand that, I'll pm you my scoreboard class via Spigot

@NathanWolf
Copy link
Member

Sure, I may not be much help there though, I've never used the scoreboard.

I'd suggest just printing the SP value to logs or chat for starters just to make sure you've got what you're expecting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants