mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 08:25:31 +00:00
feat: init work on allay
This commit is contained in:
parent
ab60f14ff1
commit
02a7363f01
12
platforms/allay/build.gradle.kts
Normal file
12
platforms/allay/build.gradle.kts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
shadedApi(project(":common:implementation:base"))
|
||||||
|
|
||||||
|
compileOnly("org.projectlombok:lombok:1.18.32")
|
||||||
|
compileOnly("org.allaymc", "Allay-API", "1.0.0")
|
||||||
|
|
||||||
|
annotationProcessor("org.projectlombok:lombok:1.18.32")
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
package org.allaymc.terra.allay;
|
||||||
|
|
||||||
|
import com.dfsek.terra.AbstractPlatform;
|
||||||
|
import com.dfsek.terra.api.handle.ItemHandle;
|
||||||
|
import com.dfsek.terra.api.handle.WorldHandle;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terra Project 2024/6/15
|
||||||
|
*
|
||||||
|
* @author daoge_cmd
|
||||||
|
*/
|
||||||
|
public class AllayPlatform extends AbstractPlatform {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean reload() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull String platformName() {
|
||||||
|
return "Allay";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull WorldHandle getWorldHandle() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull File getDataFolder() {
|
||||||
|
return TerraAllayPlugin.INSTANCE.getPluginContainer().dataFolder().toFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull ItemHandle getItemHandle() {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package org.allaymc.terra.allay;
|
||||||
|
|
||||||
|
import com.dfsek.terra.api.event.events.platform.PlatformInitializationEvent;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.allaymc.api.plugin.Plugin;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Terra Project 2024/6/15
|
||||||
|
*
|
||||||
|
* @author daoge_cmd
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class TerraAllayPlugin extends Plugin {
|
||||||
|
|
||||||
|
public static TerraAllayPlugin INSTANCE;
|
||||||
|
|
||||||
|
{
|
||||||
|
INSTANCE = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEnable() {
|
||||||
|
log.info("Starting Terra...");
|
||||||
|
|
||||||
|
var platform = new AllayPlatform();
|
||||||
|
platform.getEventManager().callEvent(new PlatformInitializationEvent());
|
||||||
|
|
||||||
|
// TODO: Adapt command manager
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
9
platforms/allay/src/main/resources/plugin.json
Normal file
9
platforms/allay/src/main/resources/plugin.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entrance": "org.allaymc.terra.allay.TerraAllayPlugin",
|
||||||
|
"name": "Terra",
|
||||||
|
"authors": [
|
||||||
|
"daoge_cmd"
|
||||||
|
],
|
||||||
|
"version": "1.0.0",
|
||||||
|
"order": "START_UP"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user