diff --git a/core/src/main/java/com/gmail/nossr50/datatypes/Block.java b/core/src/main/java/com/gmail/nossr50/datatypes/Block.java new file mode 100644 index 000000000..0fd095d76 --- /dev/null +++ b/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 { + +} diff --git a/core/src/main/java/com/gmail/nossr50/datatypes/BlockProperty.java b/core/src/main/java/com/gmail/nossr50/datatypes/BlockProperty.java new file mode 100644 index 000000000..58c307e9c --- /dev/null +++ b/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 { + +} diff --git a/core/src/main/java/com/gmail/nossr50/datatypes/BlockState.java b/core/src/main/java/com/gmail/nossr50/datatypes/BlockState.java new file mode 100644 index 000000000..2d4652ee3 --- /dev/null +++ b/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 { + +} diff --git a/core/src/main/java/com/gmail/nossr50/datatypes/TargetMinecraftVersion.java b/core/src/main/java/com/gmail/nossr50/datatypes/TargetMinecraftVersion.java new file mode 100644 index 000000000..47e4b7683 --- /dev/null +++ b/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"; +} diff --git a/core/src/main/java/com/gmail/nossr50/platform/AbstractPlatform.java b/core/src/main/java/com/gmail/nossr50/platform/AbstractPlatform.java new file mode 100644 index 000000000..85c2616aa --- /dev/null +++ b/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 { + +} diff --git a/core/src/main/java/com/gmail/nossr50/platform/Platform.java b/core/src/main/java/com/gmail/nossr50/platform/Platform.java new file mode 100644 index 000000000..7c953f889 --- /dev/null +++ b/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(); + +} diff --git a/core/src/main/java/com/gmail/nossr50/platform/PlatformSoftwareType.java b/core/src/main/java/com/gmail/nossr50/platform/PlatformSoftwareType.java new file mode 100644 index 000000000..15c19c069 --- /dev/null +++ b/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 +}