Skip to content

Commit

Permalink
Documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
aufdemrand committed Oct 10, 2013
1 parent 0f84bdd commit 0a1c039
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/main/java/net/aufdemrand/denizen/objects/dObject.java
Expand Up @@ -3,7 +3,7 @@
import net.aufdemrand.denizen.tags.Attribute;

// <--[language]
// @name dObject
// @name dObjects
// @description
// dObjects are a system put into place by Denizen that make working with things, or 'objects',
// in Minecraft and Denizen easier. Many parts of scripts will require some kind of object as an
Expand Down Expand Up @@ -138,6 +138,29 @@

public interface dObject {

/**
* dObjects should contain these two static methods, of which valueOf contains a valid
* annotation for ObjectFetcher
*
* public static dObject valueOf(String string);
*
* valueOf() should take a string representation of the object, preferably with a valid object
* notation (x@), and turn it into a new instance of the dObject. Care has to be taken to
* ensure that it is compatible with the tag system (ie. no periods (.) outside of square brackets),
* and other parts of Denizen.
*
* Since your object may be using the dObject Attributes System, valueOf should take that into
* account as well.
*
*
* public static boolean matches()
*
* matches() should use some logic to determine if a string is in the proper format to possibly
* return a non-null valueOf() call.
*
*/


/**
* Retrieves the dScript argument prefix. dObjects should provide a default
* prefix if nothing else has been specified.
Expand Down

0 comments on commit 0a1c039

Please sign in to comment.