Introduction

synapse banner A powerful, modular placeholder translation system designed for dynamic text processing across multiple platforms.

โšก Installation

The process is fairly simple:

  1. Download the latest synapse-PLATFORM-*.*.jar from the Releases.
  2. Place the JAR file in your server's plugins/ (or mods/ if you're on hytale) directory.
  3. Restart your server.
  4. Configure as needed.

โœจ Features

Core Features

  • ๐Ÿš€ High Performance: Optimized placeholder resolution with intelligent caching
  • ๐Ÿ”ง Modular Architecture: Clean separation between core logic and platform implementations
  • ๐ŸŽฏ Type Safety: Strongly typed generics ensure compile-time safety
  • โšก Async Processing: Non-blocking placeholder resolution with CompletableFuture support
  • ๐Ÿ—๏ธ Extensible Design: Easy to add new platforms and custom neurons
  • ๐Ÿ“ Rich API: Comprehensive API for both synchronous and asynchronous operations
  • ๐Ÿท๏ธ Namespace Management: Organized placeholder categorization and conflict prevention
  • ๐Ÿ”„ Context-Aware Resolution: Placeholders resolved based on user context and environment

Advanced Features

  • ๐Ÿ”— Relational Placeholders: Placeholders that resolve values based on relationships between 2 Users
  • ๐Ÿ’พ Intelligent Caching: Built-in caching mechanisms with expiration support
  • ๐Ÿงช Comprehensive Testing: Extensive test suite ensuring reliability
  • ๐Ÿ”™ PAPI Backward-Compatibility: In Bukkit, you can simply call BukkitNeuron#hookToPAPI and we will do the rest

๐Ÿ—๏ธ Structure

Synapse is a collection of Neurons

A Neuron is what a plugin registers to add Placeholders

Every Neuron has it's own Namespace(s)

A namespace is what defines the name(s) of that Neuron!

The format of placeholders is ${namespace.placeholder:[args1]:[arg2]:etc..} These arguments can be surrounded by double quotes ("), single quotes (') and back quotes (`)

So if a Neuron with the namespace player is registered, and we register a health placeholder inside of it, this will be the placeholder format: ${player.health}

๐Ÿ› ๏ธ For Developers

Synapse is hosted on Maven Central.

For Gradle users: You need to add mavenCentral() to your repositories block.

For Maven users: Maven Central is already included by default, so no repository configuration is needed.

Hytale Logo Hytale } > โ€ข First of all, we add it to our ``manifist.json`` ```json "OptionalDependencies": { "studio.mevera:Synapse": ">=1.0.0" } ``` โ€ข And then to our build tool! โ€ข The Synapse class in this case is: ``HytaleSynapse``

โ€ข And of course the Neuron class will be HytaleNeuron <TabItem value="bukkit" label={ <> <img src="../../assets/bukkit.png" alt="Bukkit Logo" style={{ height: 20, marginRight: 6, position: "relative", top: 2 }} /> Bukkit </> }

โ€ข First of all, we add it to our plugin.yml yaml name: "ExamplePlugin" version: 1.0.0 main: com.example.Plugin softdepend: - Synapse โ€ข And then to our build tool! โ€ข The Synapse class in this case is: BukkitSynapse

โ€ข And of course the Neuron class will be BukkitNeuron <TabItem value="bungee" label={ <> <img src="../../assets/bungeecord.png" alt="BungeeCord Logo" style={{ height: 20, marginRight: 6, position: "relative", top: 4 }} /> BungeeCord </> }

โ€ข First of all, we add it to our plugin.yml/bungee.yml yaml name: "ExamplePlugin" version: 1.0.0 main: com.example.Plugin softdepend: - Synapse โ€ข And then to our build tool! โ€ข The Synapse class in this case is: BungeeSynapse

โ€ข And of course the Neuron class will be BungeeNeuron <TabItem value="velocity" label={ <> <img src="../../assets/velocity_logo.svg" alt="Velocity Logo" style={{ height: 20, marginRight: 6, position: "relative", top: 2 }} /> Velocity </> }

โ€ข First of all, we add it to our @Plugin dependencies

@Plugin(
  id = "myfirstplugin",
  name = "My Plugin",
  version = "0.1.0",
  dependencies = {
    @Dependency(id = "synapse", optional = true)
  }
)

โ€ข And then to our build tool! โ€ข The Synapse class in this case is: VelocitySynapse

โ€ข And of course the Neuron class will be VelocityNeuron