BadRabbit allows to switch the main Plugin class at plugin load time.
public class MyPluginBadRabbit extends BadRabbit {
@Override
protected @NotNull JavaPlugin createInstance() throws Exception {
return (myCondition()) ? new MyPluginMain1() : new MyPluginMain2();
}
}
If you are looking for a real usage example, you can have a look at the Minepacks plugin here.
<repository>
<id>pcgf-repo</id>
<url>https://repo.pcgamingfreaks.at/repository/maven-everything</url>
</repository>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>BadRabbit-Bukkit</artifactId>
<version>1.11</version>
</dependency>
<dependency>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>BadRabbit-Bungee</artifactId>
<version>1.11</version>
</dependency>
- Java >= 7
- Maven >= 3.5
mvn clean install