mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
API Changes
This commit is contained in:
parent
637600c941
commit
3f6c3afe9d
@ -96,10 +96,14 @@ public class BlockMenu extends ChestMenu {
|
||||
|
||||
@Override
|
||||
public void replaceExistingItem(int slot, ItemStack item) {
|
||||
this.replaceExistingItem(slot, item, true);
|
||||
}
|
||||
|
||||
public void replaceExistingItem(int slot, ItemStack item, boolean event) {
|
||||
final ItemStack previous = getItemInSlot(slot);
|
||||
super.replaceExistingItem(slot, item);
|
||||
|
||||
if (this.event != null) event.onEvent(slot, previous, item);
|
||||
if (event && this.event != null) this.event.onEvent(slot, previous, item);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
|
@ -6,6 +6,7 @@ import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
|
||||
import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -67,10 +68,20 @@ public class UniversalBlockMenu extends ChestMenu {
|
||||
|
||||
@Override
|
||||
public void replaceExistingItem(int slot, ItemStack item) {
|
||||
this.replaceExistingItem(slot, item, true);
|
||||
}
|
||||
|
||||
public void replaceExistingItem(int slot, ItemStack item, boolean event) {
|
||||
final ItemStack previous = getItemInSlot(slot);
|
||||
super.replaceExistingItem(slot, item);
|
||||
|
||||
if (this.event != null) event.onEvent(slot, previous, item);
|
||||
if (event && this.event != null) this.event.onEvent(slot, previous, item);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
for (HumanEntity human: toInventory().getViewers()) {
|
||||
human.closeInventory();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
name: Slimefun
|
||||
version: 4.0.8
|
||||
author: mrCookieSlime
|
||||
version: 4.0.9
|
||||
authors: [mrCookieSlime, John000708]
|
||||
description: Slimefun basically turns your entire Server into a FTB modpack without installing a single mod
|
||||
website: http://mrcookieslime.github.io/
|
||||
website: http://TheBusyBiscuit.github.io/
|
||||
|
||||
main: me.mrCookieSlime.Slimefun.SlimefunStartup
|
||||
softdepend: [CS-CoreLib, ClearLag, WorldEdit]
|
||||
|
Loading…
Reference in New Issue
Block a user