summaryrefslogtreecommitdiff
path: root/src/main/java/com/redstoner/annotations
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/redstoner/annotations')
-rw-r--r--src/main/java/com/redstoner/annotations/AutoRegisterListener.java15
-rw-r--r--src/main/java/com/redstoner/annotations/Commands.java15
-rw-r--r--src/main/java/com/redstoner/annotations/Version.java32
3 files changed, 62 insertions, 0 deletions
diff --git a/src/main/java/com/redstoner/annotations/AutoRegisterListener.java b/src/main/java/com/redstoner/annotations/AutoRegisterListener.java
new file mode 100644
index 0000000..fabdb5f
--- /dev/null
+++ b/src/main/java/com/redstoner/annotations/AutoRegisterListener.java
@@ -0,0 +1,15 @@
+package com.redstoner.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/** The auto register annotation, to be put onto Classes that implement listener when you are too lazy to register the events yourself.
+ *
+ * @author Pepich */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Version(major = 1, minor = 0, revision = 1, compatible = 1)
+public @interface AutoRegisterListener
+{}
diff --git a/src/main/java/com/redstoner/annotations/Commands.java b/src/main/java/com/redstoner/annotations/Commands.java
new file mode 100644
index 0000000..537bff0
--- /dev/null
+++ b/src/main/java/com/redstoner/annotations/Commands.java
@@ -0,0 +1,15 @@
+package com.redstoner.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.redstoner.misc.CommandHolderType;
+
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Commands
+{
+ CommandHolderType value();
+}
diff --git a/src/main/java/com/redstoner/annotations/Version.java b/src/main/java/com/redstoner/annotations/Version.java
new file mode 100644
index 0000000..52d5145
--- /dev/null
+++ b/src/main/java/com/redstoner/annotations/Version.java
@@ -0,0 +1,32 @@
+package com.redstoner.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/** The Version annotation, to be applied to all Classes that are part of the project.
+ *
+ * @author Pepich */
+@Target(ElementType.TYPE)
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Version
+{
+ /** The major indicator of the version. Will be used for compatibility detection.
+ *
+ * @return the major version as an int */
+ int major();
+
+ int minor();
+
+ int revision();
+
+ /** The compatibility part of the version number. Will be used for compatibility detection.</br>
+ * Set to -1 if it is supposed to be always compatible.</br>
+ * Defaults to 1.
+ *
+ * @return the smallest compatible version as an int. */
+ int compatible() default 1;
+}