-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
The SimplixCore works as a plugin on Spigot and BungeeCord. You don't have to shade any parts of the SimplixCore (it's also very discouraged to do so on Spigot/BungeeCord!) Instead of shading the whole SimplixCore you can use the QuickStart module to ensure the SimplixCore-plugin is loaded properly on your server or download the plugin automatically if needed.
You can see how to use the QuickStart module to check whether the SimplixPlugin was installed properly here:
<!-- If you wish to use it: The SimplixQuickStartModule
QuickStartModule needs to be se shaded -->
<dependency>
<groupId>dev.simplix.core</groupId>
<artifactId>simplixcore-minecraft-bungeecord-quickstart</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.simplix.core</groupId>
<artifactId>simplixcore-common-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.simplix.core</groupId>
<artifactId>simplixcore-mineacraft-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
Spigot:
<!-- If you wish to use it: The SimplixQuickStartModule
QuickStartModule needs to be se shaded -->
<dependency>
<groupId>dev.simplix.core</groupId>
<artifactId>simplixcore-minecraft-spigot-quickstart</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>dev.simplix.core</groupId>
<artifactId>simplixcore-mineacraft-api</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
import dev.simplix.core.common.CommonSimplixModule;
import dev.simplix.core.common.aop.SimplixApplication;
import dev.simplix.core.common.inject.SimplixInstaller;
@SimplixApplication(
name = "SimplixExample",
version = "1.0.0",
authors = "SimplixSoftworks",
dependencies = "SimplixCore")
public class ExampleSimplixApplication {
@Override
public void enable() {
SimplixInstaller
.instance()
.register(getClass(), new CommonSimplixModule()/*, Other modules here*/);
}
}BungeeCord / Spigot using the Quickstart module
import dev.simplix.core.common.CommonSimplixModule;
import dev.simplix.core.common.aop.SimplixApplication;
import dev.simplix.core.common.inject.SimplixInstaller;
import dev.simplix.core.minecraft.bungeecord.quickstart.SimplixQuickStart;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
@SimplixApplication(
name = "SimplixExample",
version = "1.0.0",
authors = "SimplixSoftworks",
dependencies = "SimplixCore")
public class ExampleSimplixPlugin extends Plugin {
@Override
public void onEnable() {
// Registering the class with the @SimplixApplication
if (!SimplixQuickStart.ensureSimplixCore(this)) {
ProxyServer.getInstance().getLogger().severe("SimplixCore wasn't found...");
/*
* Handling the lack of the SimplixCore here...
* Example possibilities
* 1) Try to download it
* 2) Disable plugin
* and or Encourage user to install it using
* /simplix install (will be automatically registered by the SimplixQuickStartModule when the plugin is not present)
*/
return;
}
SimplixInstaller
.instance()
.register(getClass(), new CommonSimplixModule()/*, Other modules here*/);
}
}What you have done so far was creating an application/plugin that now has access to all possibilities the SimplixPlattform has to offer. But at the moment it is not using any of them. As the next step, it is recommended to learn how to use the dependency-injection build into The SimplixCore to its fullest potential. If you are using the SimplixCore as a plugin it is highly recommended to learn how to use the dependency system of the SimplixPlattform to learn how to load libraries dynamically instead of making them bloating your jar. For further real world-examples see an Example-Project here.
2020 - SimplixSoftworks
- Introduction
- Getting started
- Maven Dependencies
- How to use the Dependency-Injection
- Localization
- Listener API
- SQL
- Libraries
- Utilities
- Contribute
