From 5aa34c7d4fbb4e6d4a7c9910532b01193d8ef03c Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Wed, 16 Oct 2019 19:43:52 +0200 Subject: [PATCH] Add ItemFilter API --- pom.xml | 2 +- .../Minepacks/Bukkit/API/ItemFilter.java | 25 +++++++++++++++++++ .../Minepacks/Bukkit/API/MinepacksPlugin.java | 2 ++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/at/pcgamingfreaks/Minepacks/Bukkit/API/ItemFilter.java diff --git a/pom.xml b/pom.xml index 129f75a..cbcf59e 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 at.pcgamingfreaks Minepacks-API - 2.0 + 2.0.11 scm:git:git@github.com:GeorgH93/Minepacks.git diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/ItemFilter.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/ItemFilter.java new file mode 100644 index 0000000..12b37bd --- /dev/null +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/ItemFilter.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2019 GeorgH93 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package at.pcgamingfreaks.Minepacks.Bukkit.API; + +import org.bukkit.inventory.ItemStack; + +public interface ItemFilter +{ + boolean isItemBlocked(ItemStack item); +} \ No newline at end of file diff --git a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java index 26c95cd..b61889d 100644 --- a/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java +++ b/src/at/pcgamingfreaks/Minepacks/Bukkit/API/MinepacksPlugin.java @@ -127,4 +127,6 @@ public interface MinepacksPlugin * @return True if the player can use a backpack. False if not. */ boolean isPlayerGameModeAllowed(Player player); + + @Nullable ItemFilter getItemFilter(); } \ No newline at end of file