Skip to content

Commit

Permalink
Officially deprecate tags we deprecated forever ago
Browse files Browse the repository at this point in the history
How was this kept for so long?
  • Loading branch information
mcmonkey4eva committed Nov 26, 2015
1 parent fcc5089 commit b470b70
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/main/java/net/aufdemrand/denizen/objects/dPlayer.java
Expand Up @@ -869,37 +869,16 @@ else if (dEntity.matches(ent)) {
return effects.getAttribute(attribute.fulfill(1));
}

// <--[tag]
// @attribute <p@player.list>
// @returns dList(dPlayer)
// @description
// Returns all players that have ever played on the server, online or not.
// ** NOTE: This tag is old. Please instead use <server.list_players> **
// -->
if (attribute.startsWith("list")) {
dB.echoError("DO NOT USE PLAYER.LIST AS A TAG, please use <server.list_online_players> and related tags!");
List<String> players = new ArrayList<String>();

// <--[tag]
// @attribute <p@player.list.online>
// @returns dList(dPlayer)
// @description
// Returns all online players.
// **NOTE: This will only work if there is a player attached to the current script.
// If you need it anywhere else, use <server.list_online_players>**
// -->
if (attribute.startsWith("list.online")) {
for (Player player : Bukkit.getOnlinePlayers())
players.add(player.getName());
return new dList(players).getAttribute(attribute.fulfill(2));
}

// <--[tag]
// @attribute <p@player.list.offline>
// @returns dList(dPlayer)
// @description
// Returns all players that have ever played on the server, but are not currently online.
// ** NOTE: This tag is old. Please instead use <server.list_offline_players> **
// -->
else if (attribute.startsWith("list.offline")) {
for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
if (!player.isOnline())
Expand Down

0 comments on commit b470b70

Please sign in to comment.