Skip to content

Commit

Permalink
rename get_owner -> owner
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 26, 2019
1 parent 216c7ba commit c93f563
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -2446,7 +2446,7 @@ && getBukkitEntity() instanceof Item) {
// Returns whether the entity is tameable.
// If this returns true, it will enable access to:
// <@link mechanism dEntity.tame>, <@link mechanism dEntity.owner>,
// <@link tag e@entity.is_tamed>, and <@link tag e@entity.get_owner>
// <@link tag e@entity.is_tamed>, and <@link tag e@entity.owner>
// -->
if (attribute.startsWith("tameable") || attribute.startsWith("is_tameable")) {
return new Element(EntityTame.describes(this))
Expand Down
Expand Up @@ -30,7 +30,7 @@ public static EntityTame getFrom(dObject entity) {
}

public static final String[] handledTags = new String[] {
"is_tamed", "get_owner"
"is_tamed", "get_owner", "owner"
};

public static final String[] handledMechs = new String[] {
Expand Down Expand Up @@ -99,14 +99,14 @@ public String getAttribute(Attribute attribute) {
}

// <--[tag]
// @attribute <e@entity.get_owner>
// @attribute <e@entity.owner>
// @returns dPlayer
// @mechanism dEntity.owner
// @group properties
// @description
// Returns the owner of a tamed entity.
// -->
if (attribute.startsWith("get_owner")) {
if (attribute.startsWith("owner") || attribute.startsWith("get_owner")) {
if (((Tameable) entity.getBukkitEntity()).isTamed()) {
return new dPlayer((OfflinePlayer) ((Tameable) entity.getBukkitEntity()).getOwner())
.getAttribute(attribute.fulfill(1));
Expand Down Expand Up @@ -161,7 +161,7 @@ public void adjust(Mechanism mechanism) {
// @tags
// <e@entity.is_tamed>
// <e@entity.is_tameable>
// <e@entity.get_owner>
// <e@entity.owner>
// -->

if (mechanism.matches("owner")) {
Expand Down

0 comments on commit c93f563

Please sign in to comment.