Skip to content

Commit

Permalink
Correct Essentials tags to make sense
Browse files Browse the repository at this point in the history
<player.list> is a tag that's existed since forever - none of the Depen
tags work because of that.
  • Loading branch information
mcmonkey4eva committed Jul 26, 2014
1 parent 3824050 commit a2dadfc
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -88,13 +88,13 @@ public String getAttribute(Attribute attribute) {
}

// <--[tag]
// @attribute <p@player.list_homes>
// @attribute <p@player.home_list>
// @returns dList(Element/dLocation)
// @description
// Returns a list of the homes of the player, in the format "HomeName/l@x,y,z,world".
// @plugin Essentials
// -->
if (attribute.startsWith("list_homes")) {
if (attribute.startsWith("home_list")) {
dList homes = new dList();
for (String home : essUser.getHomes()) {
try {
Expand All @@ -107,13 +107,13 @@ public String getAttribute(Attribute attribute) {
}

// <--[tag]
// @attribute <p@player.list_home_locations>
// @attribute <p@player.home_location_list>
// @returns dList(dLocation)
// @description
// Returns a list of the locations of homes of the player.
// @plugin Essentials
// -->
if (attribute.startsWith("list_home_locations")) {
if (attribute.startsWith("home_location_list")) {
dList homes = new dList();
for (String home : essUser.getHomes()) {
try {
Expand All @@ -126,24 +126,24 @@ public String getAttribute(Attribute attribute) {
}

// <--[tag]
// @attribute <p@player.list_home_names>
// @attribute <p@player.home_name_list>
// @returns dList(Element)
// @description
// Returns a list of the names of homes of the player.
// @plugin Essentials
// -->
if (attribute.startsWith("list_home_names")) {
if (attribute.startsWith("home_name_list")) {
return new dList(essUser.getHomes()).getAttribute(attribute.fulfill(1));
}

// <--[tag]
// @attribute <p@player.list_mails>
// @attribute <p@player.mail_list>
// @returns dList(Element)
// @description
// Returns a list of mail the player currently has.
// @plugin Essentials
// -->
if (attribute.startsWith("list_mails")) {
if (attribute.startsWith("mail_list")) {
return new dList(essUser.getMails()).getAttribute(attribute.fulfill(1));
}

Expand Down

0 comments on commit a2dadfc

Please sign in to comment.