Skip to content

Commit

Permalink
Fix typo in Fly command.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcernat committed Sep 28, 2013
1 parent 005daf6 commit 1422952
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dEntity.java
Expand Up @@ -435,6 +435,17 @@ public Player getPlayer() {
return (Player) entity;
}

/**
* Get the dPlayer corresponding to this dEntity
*
* @return The dPlayer
*/

public dPlayer getDenizenPlayer() {

return new dPlayer(getPlayer());
}

/**
* Check whether this dEntity is a Player
*
Expand Down
Expand Up @@ -57,7 +57,8 @@ else if (!scriptEntry.hasObject("controller")
&& arg.matchesArgumentType(dPlayer.class)
&& arg.matchesPrefix("controller, c")) {

scriptEntry.addObject("controller", (arg.asType(dPlayer.class)));
// Check if it matches a dPlayer, but save it as a dEntity
scriptEntry.addObject("controller", (arg.asType(dEntity.class)));
}

else if (!scriptEntry.hasObject("origin")
Expand Down

0 comments on commit 1422952

Please sign in to comment.