Breaking changes:

'Gift': changed from class to enum, so now you can handle
incoming gifts in switch

`Events`
- new:
     onGiftComboFinished
- Removed:
      onGiftBrodcast
- Rename:
     onGiftMessage -> onGift
     onRoomPinMessage -> onRoomPin
     onRoomMessage -> onRoom
     onLinkMessage -> onLink
     onBarrageMessage -> onBarrage
     onPollMessage -> onPoll
     onShopMessage -> onShop
     onDetectMessage -> onDetect

`GiftManager`
   added:
      registerGift
      findById
      findByName
      getGifts
   removed:
      getActiveGifts
This commit is contained in:
JW
2023-10-05 09:04:39 +02:00
parent f55cbcae7e
commit f0d7cb0cbc
93 changed files with 5492 additions and 771 deletions

View File

@@ -39,9 +39,9 @@ public class SimpleExample {
{
switch (event.getGift()) {
case ROSE ->
print("\uD83D\uDC95", ConsoleColors.YELLOW, "x", event.getComboCount(), " roses!", "\uD83D\uDC95");
print("\uD83D\uDC95", ConsoleColors.YELLOW, "x", event.getCombo(), " roses!", "\uD83D\uDC95");
default ->
print(ConsoleColors.GREEN, "[Thanks for gift] ",ConsoleColors.YELLOW, event.getGift().getName(), "X", event.getComboCount());
print(ConsoleColors.GREEN, "[Thanks for gift] ",ConsoleColors.YELLOW, event.getGift().getName(), "X", event.getCombo());
}
})
.onConnected((client, event) ->
@@ -50,15 +50,15 @@ public class SimpleExample {
})
.onFollow((liveClient, event) ->
{
print(ConsoleColors.BLUE, "Follow -> ", ConsoleColors.WHITE_BRIGHT, event.getUser().getNickName());
print(ConsoleColors.BLUE, "Follow -> ", ConsoleColors.WHITE_BRIGHT, event.getUser().getName());
})
.onJoin((client, event) ->
{
print(ConsoleColors.GREEN, "Join -> ", ConsoleColors.WHITE_BRIGHT, event.getUser().getNickName());
print(ConsoleColors.GREEN, "Join -> ", ConsoleColors.WHITE_BRIGHT, event.getUser().getName());
})
.onComment((client, event) ->
{
print(ConsoleColors.WHITE, event.getUser().getUniqueId(), ":", ConsoleColors.WHITE_BRIGHT, event.getText());
print(ConsoleColors.WHITE, event.getUser().getName(), ":", ConsoleColors.WHITE_BRIGHT, event.getText());
})
.onEvent((client, event) ->
{