Skip to content

Commit

Permalink
meta fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 16, 2021
1 parent ffa29f1 commit 94da63d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
Expand Up @@ -40,7 +40,7 @@ public class CuboidTag implements ObjectTag, Cloneable, Notable, Adjustable, Are
// @name CuboidTag
// @prefix cu
// @base ElementTag
// @implements FlaggableObject
// @implements FlaggableObject, AreaObject
// @format
// The identity format for cuboids is <world>,<x1>,<y1>,<z1>,<x2>,<y2>,<z2>
// Multi-member cuboids can simply continue listing x,y,z pairs.
Expand Down
Expand Up @@ -37,7 +37,7 @@ public class EllipsoidTag implements ObjectTag, Notable, Cloneable, AreaContainm
// @name EllipsoidTag
// @prefix ellipsoid
// @base ElementTag
// @implements FlaggableObject
// @implements FlaggableObject, AreaObject
// @format
// The identity format for ellipsoids is <x>,<y>,<z>,<world>,<x-radius>,<y-radius>,<z-radius>
// For example, 'ellipsoid@1,2,3,space,7,7,7'.
Expand Down
Expand Up @@ -37,7 +37,7 @@ public class PolygonTag implements ObjectTag, Cloneable, Notable, Adjustable, Ar
// @name PolygonTag
// @prefix polygon
// @base ElementTag
// @implements FlaggableObject
// @implements FlaggableObject, AreaObject
// @format
// The identity format for polygons is <world>,<y-min>,<y-max>,<x1>,<z1>,... (the x,z pair repeats for as many points as the polygon has).
//
Expand Down
Expand Up @@ -459,12 +459,23 @@ else if (recipe instanceof CookingRecipe<?>) {
return;
}

// Documented in AbstractFlagTracker
// <--[tag]
// @attribute <server.has_flag[<flag_name>]>
// @returns ElementTag(Boolean)
// @description
// See <@link tag FlaggableObject.has_flag>
// -->
if (attribute.startsWith("has_flag")) {
event.setReplacedObject(Denizen.getInstance().serverFlagMap.doHasFlagTag(attribute)
.getObjectAttribute(attribute.fulfill(1)));
return;
}
// <--[tag]
// @attribute <server.flag_expiration[<flag_name>]>
// @returns TimeTag
// @description
// See <@link tag FlaggableObject.flag_expiration>
// -->
if (attribute.startsWith("flag_expiration")) {
TimeTag exp = Denizen.getInstance().serverFlagMap.doFlagExpirationTag(attribute);
if (exp != null) {
Expand All @@ -473,6 +484,12 @@ else if (recipe instanceof CookingRecipe<?>) {
}
return;
}
// <--[tag]
// @attribute <server.flag[<flag_name>]>
// @returns ObjectTag
// @description
// See <@link tag FlaggableObject.flag>
// -->
if (attribute.startsWith("flag")) {
ObjectTag flag = Denizen.getInstance().serverFlagMap.doFlagTag(attribute);
if (flag != null) {
Expand All @@ -481,11 +498,23 @@ else if (recipe instanceof CookingRecipe<?>) {
}
return;
}
// <--[tag]
// @attribute <server.list_flags>
// @returns ListTag
// @description
// See <@link tag FlaggableObject.list_flags>
// -->
if (attribute.startsWith("list_flags")) {
event.setReplacedObject(Denizen.getInstance().serverFlagMap.doListFlagsTag(attribute)
.getObjectAttribute(attribute.fulfill(1)));
return;
}
// <--[tag]
// @attribute <server.flag_map>
// @returns MapTag
// @description
// See <@link tag FlaggableObject.flag_map>
// -->
if (attribute.startsWith("flag_map")) {
event.setReplacedObject(Denizen.getInstance().serverFlagMap.doFlagMapTag(attribute)
.getObjectAttribute(attribute.fulfill(1)));
Expand Down

0 comments on commit 94da63d

Please sign in to comment.