Skip to content
This repository was archived by the owner on Jul 24, 2021. It is now read-only.

Commit e429aa1

Browse files
AlessevanBakaAless
authored andcommitted
Allow creation of InventoryAPI with a class which extends JavaPlugin
Change version from 1.0.1 to 1.0.2
1 parent ce540ba commit e429aa1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'fr.bakaaless'
7-
version '1.0.1'
7+
version '1.0.2'
88

99
def spigotVersion = "1.15"
1010
def subVersion = ".2"

src/main/java/fr/bakaaless/inventory/InventoryAPI.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ public static InventoryAPI create(final JavaPlugin plugin) {
4646
return new InventoryAPI(plugin);
4747
}
4848

49+
public static InventoryAPI create(final Class<? extends JavaPlugin> plugin) {
50+
return new InventoryAPI(JavaPlugin.getProvidingPlugin(plugin));
51+
}
52+
4953
public InventoryAPI setSize(final int size) {
5054
if (build) {
5155
this.plugin.getLogger().log(Level.WARNING, "Can't edit \"size\" option in InventoryAPI 'cause the inventory is already built");

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: InventoryAPI
22
main: fr.bakaaless.InventoryPlugin
3-
version: 1.0.1
3+
version: 1.0.2
44
api-version: 1.15
55
author: BakaAless

0 commit comments

Comments
 (0)