DRE2N / FactionsOne

Factions 1.8.2 with UUID support - updated to latest Bukkit versions!
https://www.spigotmc.org/resources/factionsone.9249/
3 stars 14 forks source link

[API] Errors/No instances found #37

Open Gardiac opened 6 years ago

Gardiac commented 6 years ago

Hey So I made a plugin long time ago that is actually pretty cool addon and it worked fine with any factions except now I cannot find these in your F_One :/ Could you help please? http://prntscr.com/gs9dt2 http://prntscr.com/gs9e9g (Lately I found out that first Board could be done without getting instance) http://prntscr.com/gs9ep8

Sataniel98 commented 6 years ago

Massivecraft called all singleton instance fields "i".

Gardiac commented 6 years ago

Could you make example of let's say first screenshot?

Sataniel98 commented 6 years ago

FPlayers.i.get()... You'll need to have a look at the source code. FactionsUUID for example renamed a lot of the methods.

Gardiac commented 6 years ago

There are no such methods I've also looked in to the src?

Sataniel98 commented 6 years ago

Yes there are. Some of the methods are inherited from EntityCollection, though.

Gardiac commented 6 years ago

could you please write all of them down? <3

Sataniel98 commented 6 years ago

For the cases you mentioned, that should be: "FPlayers.i.get(player).getFaction()". I won't spoonfeed you all getters in the entire plugin since it's actually quite simple if you understand the principle.

FactionsUUID | original

Factions, FPlayers = Factions, FPlayers

getInstance() = i

getByPlayer(Player), getBySomethingElse(SomethingElse) = get(Player), get(SomethingElse)