Skip to content

Commit

Permalink
Fix essentials link
Browse files Browse the repository at this point in the history
Get player by name = bad. UUID = good but maybe not supported fully yet.
Player object = compromise.
  • Loading branch information
mcmonkey4eva committed Jul 25, 2014
1 parent 005413e commit 3824050
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -11,7 +11,9 @@

public class EssentialsPlayerTags implements Property {

public static boolean describes(dObject pl) { return pl instanceof dPlayer; }
public static boolean describes(dObject pl) {
return pl instanceof dPlayer && ((dPlayer) pl).isOnline();
}

public static EssentialsPlayerTags getFrom(dObject pl) {
if (!describes(pl)) return null;
Expand All @@ -23,7 +25,10 @@ public static EssentialsPlayerTags getFrom(dObject pl) {
// Instance Fields and Methods
/////////////

private EssentialsPlayerTags(dPlayer pl) { this.essUser = Depenizen.essentials.getUser(pl.getName()); }
private EssentialsPlayerTags(dPlayer pl) {
// TODO: UUID
this.essUser = Depenizen.essentials.getUser(pl.getPlayerEntity());
}

User essUser = null;

Expand Down

0 comments on commit 3824050

Please sign in to comment.