Skip to content

Commit

Permalink
objecttype meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 15, 2021
1 parent a6f0f85 commit 58d8857
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 110 deletions.
Expand Up @@ -23,18 +23,20 @@

public class BiomeTag implements ObjectTag, Adjustable, FlaggableObject {

// <--[language]
// @name BiomeTag Objects
// @group Object System
// <--[ObjectType]
// @name BiomeTag
// @prefix b
// @base ElementTag
// @implements FlaggableObject
// @format
// The identity format for biomes is simply the biome name, as registered in Bukkit, for example: 'desert'.
//
// @description
// A BiomeTag represents a world biome type.
//
// A list of all valid Bukkit biomes can found be at
// <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Biome.html>
//
// These use the object notation "b@".
// The identity format for biomes is simply the biome name, as registered in Bukkit, for example: 'desert'.
//
// This object type is flaggable.
// Flags on this object type will be stored in the server saves file, under special sub-key "__biomes"
//
Expand Down
Expand Up @@ -29,16 +29,18 @@

public class ChunkTag implements ObjectTag, Adjustable, FlaggableObject {

// <--[language]
// @name ChunkTag Objects
// @group Object System
// @description
// A ChunkTag represents a chunk in the world.
//
// These use the object notation "ch@".
// <--[ObjectType]
// @name ChunkTag
// @prefix ch
// @base ElementTag
// @implements FlaggableObject
// @format
// The identity format for chunks is <x>,<z>,<world>
// For example, 'ch@5,3,world'.
//
// @description
// A ChunkTag represents a chunk in the world.
//
// Note that the X/Z pair are chunk coordinates, not block coordinates.
// To convert from block coordinates to chunk coordinates, divide by 16 and round downward.
// Note that negative chunks are one unit lower than you might expect.
Expand Down
Expand Up @@ -18,18 +18,19 @@

public class ColorTag implements ObjectTag {

// <--[language]
// @name ColorTag Objects
// @group Object System
// <--[ObjectType]
// @name ColorTag
// @prefix co
// @base ElementTag
// @format
// The identity format for colors is <red>,<green>,<blue> or the name of a color.
// For example, 'co@50,64,128' or 'co@red'.
//
// @description
// A ColorTag represents an RGB color code.
//
// Note that a ColorTag is NOT a base dye color (used by wool, etc). That is handled by a separate naming system.
//
// These use the object notation "co@".
// The identity format for colors is <red>,<green>,<blue> or the name of a color.
// For example, 'co@50,64,128' or 'co@red'.
//
// Construction a ColorTag also accepts 'random' to pick a random RGB color, or hex code like '#FF00FF'.
//
// A list of accepted color names can be found at
Expand Down
Expand Up @@ -36,9 +36,16 @@

public class CuboidTag implements ObjectTag, Cloneable, Notable, Adjustable, AreaContainmentObject, FlaggableObject {

// <--[language]
// @name CuboidTag Objects
// @group Object System
// <--[ObjectType]
// @name CuboidTag
// @prefix cu
// @base ElementTag
// @implements FlaggableObject
// @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.
// For example, 'cu@space,1,2,3,4,5,6'.
//
// @description
// A CuboidTag represents a cuboidal region in the world.
//
Expand All @@ -48,11 +55,6 @@ public class CuboidTag implements ObjectTag, Cloneable, Notable, Adjustable, Are
// One 'cuboid' consists of two points: the low point and a high point.
// a CuboidTag can contain as many cuboids within itself as needed (this allows forming more complex shapes from a single CuboidTag).
//
// These use the object notation "cu@".
// The identity format for cuboids is <world>,<x1>,<y1>,<z1>,<x2>,<y2>,<z2>
// Multi-member cuboids can simply continue listing x,y,z pairs.
// For example, 'cu@space,1,2,3,4,5,6'.
//
// This object type can be noted.
//
// This object type is flaggable when it is noted.
Expand Down
Expand Up @@ -33,19 +33,21 @@

public class EllipsoidTag implements ObjectTag, Notable, Cloneable, AreaContainmentObject, FlaggableObject {

// <--[language]
// @name EllipsoidTag Objects
// @group Object System
// <--[ObjectType]
// @name EllipsoidTag
// @prefix ellipsoid
// @base ElementTag
// @implements FlaggableObject
// @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'.
//
// @description
// An EllipsoidTag represents an ellipsoidal region in the world.
//
// The word 'ellipsoid' means a less strict sphere.
// Basically: an "ellipsoid" is to a 3D "sphere" what an "ellipse" (or "oval") is to a 2D "circle".
//
// These use the object notation "ellipsoid@".
// 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'.
//
// This object type can be noted.
//
// This object type is flaggable when it is noted.
Expand Down
Expand Up @@ -52,9 +52,15 @@

public class EntityTag implements ObjectTag, Adjustable, EntityFormObject, FlaggableObject, Cloneable {

// <--[language]
// @name EntityTag Objects
// @group Object System
// <--[ObjectType]
// @name EntityTag
// @prefix e
// @base ElementTag
// @implements FlaggableObject, PropertyHolderObject
// @format
// The identity format for entities is a spawned entity's UUID, or an entity type.
// For example, 'e@abc123' or 'e@zombie'.
//
// @description
// An EntityTag represents a spawned entity, or a generic entity type.
//
Expand All @@ -63,10 +69,6 @@ public class EntityTag implements ObjectTag, Adjustable, EntityFormObject, Flagg
//
// Note that a spawned entity can be a living entity (a player, NPC, or mob) or a nonliving entity (a painting, item frame, etc).
//
// These use the object notation "e@".
// The identity format for entities is a spawned entity's UUID, or an entity type.
// For example, 'e@abc123' or 'e@zombie'.
//
// This object type is flaggable.
// Flags on this object type will be stored in the world chunk files as a part of the entity's NBT.
//
Expand Down
Expand Up @@ -52,18 +52,20 @@

public class InventoryTag implements ObjectTag, Notable, Adjustable, FlaggableObject {

// <--[language]
// @name InventoryTag Objects
// @group Object System
// <--[ObjectType]
// @name InventoryTag
// @prefix in
// @base ElementTag
// @implements FlaggableObject, PropertyHolderObject
// @format
// The identity format for inventories is a the classification type of inventory to use. All other data is specified through properties.
//
// @description
// An InventoryTag represents an inventory, generically or attached to some in-the-world object.
//
// Inventories can be generically designed using inventory script containers,
// and can be modified using the inventory command.
//
// These use the object notation "in@".
// The identity format for inventories is a the classification type of inventory to use. All other data is specified through properties.
//
// Valid inventory type classifications:
// "npc", "player", "crafting", "enderchest", "workbench", "entity", "location", "generic"
//
Expand Down
Expand Up @@ -44,9 +44,15 @@

public class ItemTag implements ObjectTag, Notable, Adjustable, FlaggableObject {

// <--[language]
// @name ItemTag Objects
// @group Object System
// <--[ObjectType]
// @name ItemTag
// @prefix i
// @base ElementTag
// @implements FlaggableObject, PropertyHolderObject
// @format
// The identity format for items is the basic material type name, or an item script name. Other data is specified in properties.
// For example, 'i@stick'.
//
// @description
// An ItemTag represents a holdable item generically.
//
Expand All @@ -55,10 +61,6 @@ public class ItemTag implements ObjectTag, Notable, Adjustable, FlaggableObject
// ItemTags do NOT remember where they came from. If you read an item from an inventory, changing it
// does not change the original item in the original inventory. You must set it back in.
//
// These use the object notation "i@".
// The identity format for items is the basic material type name, or an item script name. Other data is specified in properties.
// For example, 'i@stick'.
//
// Find a list of valid materials at:
// <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html>
// Note that some materials on that list are exclusively for use with blocks, and cannot be held as items.
Expand Down
Expand Up @@ -60,19 +60,22 @@

public class LocationTag extends org.bukkit.Location implements ObjectTag, Notable, Adjustable, FlaggableObject {

// <--[language]
// @name LocationTag Objects
// @group Object System
// @description
// A LocationTag represents a point in the world.
//
// These use the object notation "l@".
// Note that 'l' is a lowercase 'L', the first letter in 'location'.
// <--[ObjectType]
// @name LocationTag
// @prefix l
// @base ElementTag
// @implements FlaggableObject
// @format
// The identity format for locations is <x>,<y>,<z>,<pitch>,<yaw>,<world>
// Note that you can leave off the world, and/or pitch and yaw, and/or the z value.
// You cannot leave off both the z and the pitch+yaw at the same time.
// For example, 'l@1,2.15,3,45,90,space' or 'l@7.5,99,3.2'
//
// @description
// A LocationTag represents a point in the world.
//
// Note that 'l' prefix is a lowercase 'L', the first letter in 'location'.
//
// This object type is flaggable.
// Flags on this object type will be stored in the chunk file inside the world folder.
//
Expand Down
Expand Up @@ -30,16 +30,18 @@

public class MaterialTag implements ObjectTag, Adjustable, FlaggableObject {

// <--[language]
// @name MaterialTag Objects
// @group Object System
// @description
// A MaterialTag represents a material (a type of block or item).
//
// These use the object notation "m@".
// <--[ObjectType]
// @name MaterialTag
// @prefix m
// @base ElementTag
// @implements FlaggableObject, PropertyHolderObject
// @format
// The identity format for materials is the material type name.
// For example, 'm@stick'.
//
// @description
// A MaterialTag represents a material (a type of block or item).
//
// Block materials may sometimes also contain property data,
// for specific values on the block material such as the growth stage of a plant or the orientation of a stair block.
//
Expand Down
18 changes: 11 additions & 7 deletions plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java
Expand Up @@ -52,15 +52,19 @@

public class NPCTag implements ObjectTag, Adjustable, InventoryHolder, EntityFormObject, FlaggableObject {

// <--[language]
// @name NPCTag Objects
// @group Object System
// @description
// An NPCTag represents an NPC configured through Citizens.
//
// These use the object notation "n@".
// <--[ObjectType]
// @name NPCTag
// @prefix n
// @base EntityTag
// @implements FlaggableObject
// @format
// The identity format for NPCs is the NPC's id number.
// For example, 'n@5'.
// Or, an NPC's id number, followed by a comma, followed by a custom registry name.
// For example 'n@12,specialnpcs'
//
// @description
// An NPCTag represents an NPC configured through Citizens.
//
// This object type is flaggable.
// Flags on this object type will be stored in the Citizens saves.yml file, under the 'denizen_flags' trait.
Expand Down
Expand Up @@ -56,15 +56,17 @@

public class PlayerTag implements ObjectTag, Adjustable, EntityFormObject, FlaggableObject {

// <--[language]
// @name PlayerTag Objects
// @group Object System
// <--[ObjectType]
// @name PlayerTag
// @prefix p
// @base EntityTag
// @implements FlaggableObject
// @format
// The identity format for players is the UUID of the relevant player.
//
// @description
// A PlayerTag represents a player in the game.
//
// These use the object notation "p@".
// The identity format for players is the UUID of the relevant player.
//
// This object type is flaggable.
// Flags on this object type will be stored in the file "plugins/Denizen/player_flags/(UUID).dat",
// with automatic loading only when the player is online and caching for interacting with offline player flags.
Expand Down
Expand Up @@ -18,16 +18,18 @@

public class PluginTag implements ObjectTag, FlaggableObject {

// <--[language]
// @name PluginTag Objects
// @group Object System
// @description
// A PluginTag represents a Bukkit plugin on the server.
//
// These use the object notation "pl@".
// <--[ObjectType]
// @name PluginTag
// @prefix pl
// @base ElementTag
// @implements FlaggableObject
// @format
// The identity format for plugins is the plugin's registered name.
// For example, 'pl@Denizen'.
//
// @description
// A PluginTag represents a Bukkit plugin on the server.
//
// This object type is flaggable.
// Flags on this object type will be stored in the server saves file, under special sub-key "__plugins"
//
Expand Down
Expand Up @@ -33,9 +33,14 @@

public class PolygonTag implements ObjectTag, Cloneable, Notable, Adjustable, AreaContainmentObject, FlaggableObject {

// <--[language]
// @name PolygonTag Objects
// @group Object System
// <--[ObjectType]
// @name PolygonTag
// @prefix polygon
// @base ElementTag
// @implements FlaggableObject
// @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).
//
// @description
// A PolygonTag represents a polygonal region in the world.
//
Expand All @@ -44,9 +49,6 @@ public class PolygonTag implements ObjectTag, Cloneable, Notable, Adjustable, Ar
//
// PolygonTags are NOT polyhedra.
//
// These use the object notation "polygon@".
// The identity format for cuboids is <world>,<y-min>,<y-max>,<x1>,<z1>,... (the x,z pair repeats for as many points as the polygon has).
//
// A PolygonTag with 4 points at right angles would cover an area also possible to be defined by a CuboidTag, however all other shapes a PolygonTag can form are unique.
//
// Compared to CuboidTags, PolygonTags are generally slower to process and more complex to work with, but offer the benefit of supporting more intricate shapes.
Expand Down

0 comments on commit 58d8857

Please sign in to comment.