Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addon template update #9

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ assignees: ''
<!-- We may also close your Issue if you are not providing the exact version numbers. -->
<!-- "latest" IS NOT A VERSION NUMBER. -->
<!-- You can also just run "/sf versions" and show us a screenshot of that. -->

- Minecraft Version:
- CS-CoreLib Version:
- <!-- Please Make sure you are using the latest and official Dev build and not an unofficial or RC build. -->
- Slimefun Version:
- Plugin Version:
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:

steps:
- uses: actions/[email protected]
- name: Set up JDK 1.8
- name: Set up JDK 16
uses: actions/[email protected]
with:
java-version: 1.8
java-version: 16
- name: Build with Maven
run: mvn package --file pom.xml
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>1.0.0</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -50,14 +50,14 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-28</version>
<version>RC-32</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
15 changes: 11 additions & 4 deletions src/main/java/me/CHANGEME/slimefunaddon/ExampleAddon.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.CHANGEME.slimefunaddon;

import io.github.thebusybiscuit.slimefun4.libraries.dough.updater.GitHubBuildsUpdater;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.ItemStack;
Expand All @@ -13,15 +14,21 @@
import io.github.thebusybiscuit.slimefun4.libraries.dough.config.Config;
import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack;

import java.io.File;

public class ExampleAddon extends JavaPlugin implements SlimefunAddon {

@Override
public void onEnable() {
// Read something from your config.yml
Config cfg = new Config(this);
if (!new File(getDataFolder(), "config.yml").exists()) {
saveDefaultConfig();
}
//Auto updater for https://thebusybiscuit.github.io/builds/
if (getConfig().getBoolean("options.auto-update") && getDescription().getVersion().startsWith("DEV - ")) {
new GitHubBuildsUpdater(this, getFile(), "CHANGEME/ExampleAddon/master").start();

if (cfg.getBoolean("options.auto-update")) {
// You could start an Auto-Updater for example
}

/*
Expand Down Expand Up @@ -68,8 +75,8 @@ public void onDisable() {

@Override
public String getBugTrackerURL() {
// You can return a link to your Bug Tracker instead of null here
return null;
//adds a link for people to report any bugs/errors/issues to your addon's github page
return "https://github.com/CHANGEME/ExampleAddon/issues";
}

@Override
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ website: https://github.com/Slimefun/Addon-Template
version: ${project.version}

## This is the minimum minecraft version required to run your plugin.
api-version: 1.14
api-version: 1.16

## This is required and marks Slimefun as a plugin dependency.
depend:
- Slimefun
depend: [Slimefun]

## This is Optional and can be used to mark a plugin for possible integration and compatibility.
softdepend: []