Przeglądaj źródła

Planning this out is actually quite hard, getting sleepy now so I'll flesh this out tomorrow.

nossr50 6 lat temu
rodzic
commit
a2c0a02d30

+ 10 - 0
core/src/main/java/com/gmail/nossr50/datatypes/Block.java

@@ -0,0 +1,10 @@
+package com.gmail.nossr50.datatypes;
+
+/**
+ * Represents a container of properties and values for a Block
+ * @see BlockProperty
+ * @see BlockState
+ */
+public interface Block {
+
+}

+ 8 - 0
core/src/main/java/com/gmail/nossr50/datatypes/BlockProperty.java

@@ -0,0 +1,8 @@
+package com.gmail.nossr50.datatypes;
+
+/**
+ * BlockProperties are key value pairs for a blocks state
+ */
+public interface BlockProperty {
+
+}

+ 8 - 0
core/src/main/java/com/gmail/nossr50/datatypes/BlockState.java

@@ -0,0 +1,8 @@
+package com.gmail.nossr50.datatypes;
+
+/**
+ * Representation of the state for a Block
+ */
+public interface BlockState {
+
+}

+ 13 - 0
core/src/main/java/com/gmail/nossr50/datatypes/TargetMinecraftVersion.java

@@ -0,0 +1,13 @@
+package com.gmail.nossr50.datatypes;
+
+import com.gmail.nossr50.platform.Platform;
+
+/**
+ * Constants for targeted versions of MC
+ * @see Platform#getTargetMinecraftVersion()
+ */
+public class TargetMinecraftVersion {
+    public static final String MC_VERSION_1_8_8     = "1_8_8";
+    public static final String MC_VERSION_1_12_2    = "1_12_2";
+    public static final String MC_VERSION_1_13_2    = "1_13_2";
+}

+ 8 - 0
core/src/main/java/com/gmail/nossr50/platform/AbstractPlatform.java

@@ -0,0 +1,8 @@
+package com.gmail.nossr50.platform;
+
+/**
+ * This is the implementation of the Platform Interface
+ */
+public abstract class AbstractPlatform implements Platform {
+
+}

+ 33 - 0
core/src/main/java/com/gmail/nossr50/platform/Platform.java

@@ -0,0 +1,33 @@
+package com.gmail.nossr50.platform;
+
+/**
+ * Represents the current API Platform
+ * mcMMO supports multiple platforms, so that abstraction is handled through this interface
+ */
+public interface Platform {
+
+    /**
+     * Gets the name of the Platform
+     * @return name of this platform
+     */
+    String getPlatformName();
+
+    /**
+     * Gets the version of this platform
+     * @return the current version of this platform
+     */
+    String getPlatformVersion();
+
+    /**
+     * Gets the target version of Minecraft for this platform
+     * @return this platform's target minecraft version
+     */
+    String getTargetMinecraftVersion();
+
+    /**
+     * Whether or not this platform has been loaded
+     * @return true if the platform is loaded
+     */
+    Boolean isPlatformLoaded();
+
+}

+ 10 - 0
core/src/main/java/com/gmail/nossr50/platform/PlatformSoftwareType.java

@@ -0,0 +1,10 @@
+package com.gmail.nossr50.platform;
+
+/**
+ * Constants representing the software the platform belongs to
+ */
+public enum PlatformSoftwareType {
+    NMS,
+    BUKKIT,
+    SPONGE
+}