4.3.1latestsmall fixes and improvementsJul 29, 2018 changes4.3.0new CloseInformerPage decorator and some older updates that i forgot to publish hereJul 26, 2018 added a new page decorator which will inform you when a player closes your page. changes added a method called "rearrange" to pages which will allow you to rearrange panes inside pages above and below each other. there is also "add" and "remove" methods which you already know for what. implementation of the rearrange method4.1.0-alphaitem and element on cursor requirementsJul 6, 2018 added two new requirements. also, i will soon record a new video to show the power of black with the 4.0.0 update. changes4.0.0-alphawelcome to the brand new event handling mechanismMay 24, 2018 introduction this update is all about old ugly event handling mechanism's retirement that you will never need from now on. it also brings the ability of handling the drag events. let's get started, shall we? i'm presenting you the requirements remember the old boolean methods like ` ElementClickEvent#clickTypeIs` or ` ElementClickEvent#isLeftClick`? requirements are replacement for all of them. they take the event and check if it matches certain conditions of their. requirements determine if an event should be handled or not. for example there is a requirement called ` ClickTypeReq`, which requires the event to have a specific click type. if the event is not meeting the conditions of that requirement, it will not be handled by the handler it is connected. but there is an exception... the or requirement OrReq the or requirement or ` OrReq` is a requirement which takes bunch of other requirements and see if any single one of them is returning true, and ` OrReq` itself returns true when that happens. the best part about the ` OrReq`s is, you can stack infinite number of them on top of each other. because decorator pattern targets (of event listeners) targets are combining requirements with your event handler consumers. they ask for some requirements and an event handler. if you don't give any requirements to them, they accept every event they can. i used the word can on purpose since there are multiple target implementations. two of them are event specific (click and drag) and the other one can take all of the others' events. so if you for example have a ` DragTargetyou can only catchInventoryDragEvent`s. but an element can have multiple targets... and you can use the ` BasicTarget` as a default target (catches all events). and the element will inform all the targets of itself when an event occurs. the old consumer is still here with some minor modifications. yes it is here but from now on the ` ElementEvent`s (yes there are now multiple of them) haven't got any boolean methods. so you can't have an if statement like "is this a left click?". instead you have to use requirements for this kind of stuff. trust me, this will make your life much easier and make your code more maintainable. the consumers will be used within targets. each type of target wants a different ` ElementEvent` like the ` DragTargetneeds anElementDragEventor theClickTarget` needs an ` ElementClickEventwhile theBasicTargetneeds anElementBasicEvent`. conclusion i believe that this new update will make the framework better and if you think the otherwise, have any suggestions or if you have any problems with this update, please open an issue. and please do keep in mind that this version is not heavily tested and it is in the alpha state. stay black!3.3.0preparing the ground for the next big updateMay 21, 2018 changes3.2.0page update made better, two new pane methods addedMay 16, 2018 page update made better, two new pane methods added update method of the page before this update, when you have modified a page and the player had an item on their cursor, that item would be dropped to the ground because we were opening a new inventory. this update changed this behaviour by updating the already open inventories in an elegant way instead. no lost items anymore! new pane methods the interface got two new methods. fill(Element...) filling the pane with the elements given. if amount of elements given is not enough to fill the pane, the method will reuse the given ones till the pane has no empty slots anymore. replaceAll(Element...) this method will replace every element or empty slot inside the pane with the given ones. this will not reuse the given elements unlike the fill(Element...) method. changes3.1.0aiming 100% thread-safety!May 15, 2018 the new decorators TSafePage, TSafePane and TSafeElement can make any page, pane or element thread-safe! use them when you need them. example: Code (Text): final Element myThreadSafeElement = new TSafeElement( new BasicElement(new ItemStack(Material.DIAMOND), event -> event.cancel()) ); also Blackness's thread-safety made better.3.0.1written javadocs, improved code style and added static code analysisMay 15, 2018 · added javadocs for every class and every method which tends to be used by the users of this library. · added static code analyzers and improved the project by the help of them. changes3.0.0element's now have their own event to listen! and i need some suggestionsMay 8, 2018 ElementClickEvent is replacing InventoryClickEvent with major improvements and a better design overall. ElementClickEvent contains the methods of InventoryClickEvent but most of them are @Deprecated (will be removed in the near future) and some of them have alternatives. this new event is using the old event in the backstage and decorating it with useful additions but it is not in a complete object-oriented way. it has too many methods and no type. i actually wanted to let the users create their event handlers like this (warning! this idea is not complete): Code (Text): // vertical decorators new BasicElement( myIcon, new ClickTypeTarget( ClickType.RIGHT, new SlotTarget( 10, new PlayerTarget( "Personinblack", new BaseTarget( (event, player, itemOnCursor, clickedItem) -> { event.cancel(); // this is the only method of the event player.sendMessage( "You Clicked On The " + clickedItem + " while holding the " + itemOnCursor ); } ) ) ) ) ); // horizontal decorators new BasicElement( myIcon, new BaseTarget( (event, player, itemOnCursor, clickedItem) -> { event.cancel(); // this is the only method of the event player.sendMessage( "You Clicked On The " + clickedItem + " while holding the " + itemOnCursor ); }, new ClickTypeTarget(ClickType.RIGHT), new SlotTarget(10), new PlayerTarget("Personinblack") ) ); this is the object-oriented way of creating the ElementClickEvent but it is just an idea at the moment and i have a few concerns about it. for now, we will stick with what we have and i will try to make this idea come alive later... please do keep in mind that i'm in the need of suggestions to make this better. so, if you have anything to say, just say it, i will listen.2.0.0version 2.0.0 came! (with some breaking changes)Apr 25, 2018 the most important change in this update is that from now on, you don't have to manually call thePage#showTomethod everytime you update your pages or panes inside your pages. read the other changes at here and update your existing codebases with new changes.1.0.5inventories with 6+ rowsMar 29, 2018 you are now capable of creating inventories with more than 6 rows! changes1.0.3live panes are here!Dec 12, 2017 created live panes to make animated inventories much more enjoyable. changes1.0.2fixed multiple plugins registering the listener multiple timesDec 1, 2017 multiple plugins working with black won't be an issue anymore. changes1.0.1live element fixNov 30, 2017 added a new ctor to basic pane, fixed live element for multiple inventories. changes1.0.0Nov 30, 2017
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta