Skip to content

Commit

Permalink
Add <player.ip> tag, return player ip in format #.#.#.#
Browse files Browse the repository at this point in the history
  • Loading branch information
blankiito committed Jul 26, 2013
1 parent b181f8c commit fd2b2be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Expand Up @@ -275,7 +275,11 @@ public String getAttribute(Attribute attribute) {
// -->
if (attribute.startsWith("is_online"))
return new Element(String.valueOf(isOnline())).getAttribute(attribute.fulfill(1));


// Return player ip in format #.#.#.#
if (attribute.startsWith("ip"))
return getPlayerEntity().getAddress().getHostName();

if (attribute.startsWith("list")) {
List<String> players = new ArrayList<String>();
if (attribute.startsWith("list.online")) {
Expand Down

0 comments on commit fd2b2be

Please sign in to comment.