forked from Slimefun/Addon-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 93c5daa
Showing
5 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/bin/ | ||
/.settings/ | ||
/target/ | ||
/.idea/ | ||
*.iml | ||
.project | ||
.classpath | ||
dependency-reduced-pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>me.CHANGEME</groupId> | ||
<artifactId>SlimefunAddon</artifactId> | ||
<version>1.0.0</version> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>paper-repo</id> | ||
<url>https://repo.destroystokyo.com/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<finalName>${project.name} v${project.version}</finalName> | ||
<defaultGoal>clean package</defaultGoal> | ||
<sourceDirectory>${basedir}/src/main/java</sourceDirectory> | ||
|
||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/main/resources</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>*</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.bukkit</groupId> | ||
<artifactId>bukkit</artifactId> | ||
<version>1.14.4-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.TheBusyBiscuit</groupId> | ||
<artifactId>CS-CoreLib</artifactId> | ||
<version>master-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.TheBusyBiscuit</groupId> | ||
<artifactId>Slimefun4</artifactId> | ||
<version>master-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
41 changes: 41 additions & 0 deletions
41
src/main/java/me/CHANGEME/slimefunaddon/SlimefunAddon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package me.CHANGEME.slimefunaddon; | ||
|
||
import org.bukkit.Material; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.Item.CustomItem; | ||
import me.mrCookieSlime.Slimefun.Lists.RecipeType; | ||
import me.mrCookieSlime.Slimefun.Objects.Category; | ||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; | ||
import me.mrCookieSlime.Slimefun.cscorelib2.config.Config; | ||
|
||
public class SlimefunAddon extends JavaPlugin { | ||
|
||
@Override | ||
public void onEnable() { | ||
Config cfg = new Config(this); | ||
// Read something from your config.yml | ||
|
||
// Create a new Category | ||
ItemStack categoryItem = new CustomItem(Material.DIAMOND, "&4Addon Category", "", "&7> Click to open"); | ||
Category category = new Category(categoryItem); | ||
|
||
// Create a new SlimefunItem | ||
ItemStack slimefunItem = new CustomItem(Material.DIAMOND, "&4Addon Diamond", "&c+20% Coolness"); | ||
ItemStack[] recipe = { | ||
new ItemStack(Material.EMERALD), null, new ItemStack(Material.EMERALD), | ||
null, new ItemStack(Material.DIAMOND), null, | ||
new ItemStack(Material.EMERALD), null, new ItemStack(Material.EMERALD) | ||
}; | ||
|
||
SlimefunItem item = new SlimefunItem(category, slimefunItem, "ADDON_ITEM", RecipeType.ENHANCED_CRAFTING_TABLE, recipe); | ||
item.register(); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
// Logic for disabling the plugin... | ||
} | ||
|
||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: SlimefunAddon | ||
version: ${project.version} | ||
author: CHANGEME | ||
description: A generic Slimefun-Addon | ||
website: https://github.com/TheBusyBiscuit/Slimefun4-Addon | ||
|
||
main: me.CHANGEME.slimefunaddon.SlimefunAddon | ||
depend: [Slimefun] | ||
|
||
api-version: 1.14 |