-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNoticeHandler.java
More file actions
26 lines (20 loc) · 900 Bytes
/
NoticeHandler.java
File metadata and controls
26 lines (20 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.eternalcode.parcellockers.command.handler;
import com.eternalcode.multification.notice.Notice;
import com.eternalcode.parcellockers.notification.NoticeService;
import dev.rollczi.litecommands.handler.result.ResultHandler;
import dev.rollczi.litecommands.handler.result.ResultHandlerChain;
import dev.rollczi.litecommands.invocation.Invocation;
import org.bukkit.command.CommandSender;
public class NoticeHandler implements ResultHandler<CommandSender, Notice> {
private final NoticeService noticeService;
public NoticeHandler(NoticeService noticeService) {
this.noticeService = noticeService;
}
@Override
public void handle(Invocation<CommandSender> invocation, Notice result, ResultHandlerChain<CommandSender> chain) {
this.noticeService.create()
.viewer(invocation.sender())
.notice(result)
.send();
}
}