Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Latest commit

 

History

History
74 lines (58 loc) · 2.45 KB

README.md

File metadata and controls

74 lines (58 loc) · 2.45 KB

Discontinued - 11/03/24

Project has been discontinued because of higly unstable and resources leaks.

All-Rights-Reserved: This project is not open-source and thus does not allow the usage of this code to third-parties. This has been set public as an archive or resources to people that are interessed of doing a similair project.

AtlasNetwork — AtlasWorld's API ⚙️

Powerful 💪, Secured 🔐, Fast 🚀 and Integrated 🤝 system to manage AtlasWorld's services.

Features

  • 🧩 Module System: AtlasNetwork works with modules, this allows adding features without requiring internal code changes. Modules are running on their own thread to still make the system reactive.
  • ⚙️ Network API: IO Socket API, for a fast and optimized data transfer. Used to sync and notify data to AtlasWorld's services
  • 🧠 Smart Server System: AtlasNetwork creates, deletes and stops servers to optimize resource usage on the whole network.
  • 🔗 Private & Public HTTP API: AtlasNetwork provides an HTTP api to access data on the network, Can be privately used when the environment does not offer a way to connect to AtlasNetwork's IO socket.

Module Api Usage

Add this to your build.gradle file:

repositories {
    maven {
        url "https://repository.atlasworld.fr/repository/maven-private/"
        credentials {
            username "$maven_user" // Replace this or define it in your gradle.properties file.
            password "$maven_password" // Same thing
        }
    }
}

dependencies {
    compileOnly "fr.atlasworld:network-module-api:${module_api_version}"
}

Now define your module's information here in src/main/resource/module.json:

{
  "name": "My Module", // Required
  "id": "my_module", //Required:  Must match regex: [a-zA-Z0-9_-]
  "description": "My First Module!", // Optional
  "version": "1.0.0", // Required
  "authors": ["me", "they"], // Optional
  "contributor": ["NicePerson"], // Optional
  "mainClass": "com.example.module.MyModule" // Required
}

Main Class:

package com.example.module;

import fr.atlasworld.network.api.NetworkModule;
import fr.atlasworld.network.api.module.lifecycle.*;

public class MyModule extends NetworkModule {
    protected void onLoad(ModuleLoadContext ctx) {
        // Execute code when the module is loaded.
    }
    
    protected void onUnload(ModuleUnloadContext ctx) {
        // Execute code when the module is activated.
    }
}