mirror of
https://github.com/CarmJos/EasyListener.git
synced 2024-09-19 21:35:51 +00:00
feat(event): 添加unregisterAll方法
添加unregisterAll方法便于快速注销单个 EasyListener实例中的全部监听器。 BREAKING CHANGE: 包名由 cc.carm.lib.easylisteners 变更为 cc.carm.lib.easylistener 。
This commit is contained in:
parent
ebfe697517
commit
4f7c93537c
@ -287,6 +287,7 @@ public class EasyListener implements Listener {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public EasyListener cancelDeath(@Nullable Predicate<Player> predicate,
|
||||
@Nullable Consumer<PlayerDeathEvent> handler) {
|
||||
final Predicate<Player> p = Optional.ofNullable(predicate).orElse((player) -> true);
|
||||
|
Loading…
Reference in New Issue
Block a user