File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
eternalcore-core/src/main/java/com/eternalcode/core/feature/motd Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 1
1
package com .eternalcode .core .feature .motd ;
2
2
3
- import com .eternalcode .core .feature .motd .messages .MotdMessages ;
4
3
import com .eternalcode .core .injector .annotations .Inject ;
5
4
import com .eternalcode .core .injector .annotations .component .Controller ;
6
5
import com .eternalcode .core .notice .NoticeService ;
@@ -21,20 +20,18 @@ class MotdJoinController implements Listener {
21
20
.build ();
22
21
23
22
private final NoticeService noticeService ;
24
- private final MotdMessages motdMessages ;
25
23
26
24
@ Inject
27
- MotdJoinController (NoticeService noticeService , MotdMessages motdMessages ) {
25
+ MotdJoinController (NoticeService noticeService ) {
28
26
this .noticeService = noticeService ;
29
- this .motdMessages = motdMessages ;
30
27
}
31
28
32
29
@ EventHandler
33
30
void onPlayerJoin (PlayerJoinEvent event ) {
34
31
Player player = event .getPlayer ();
35
32
36
33
this .noticeService .create ()
37
- .notice (this . motdMessages .motdContent ())
34
+ .notice (translation -> translation . motd () .motdContent ())
38
35
.player (player .getUniqueId ())
39
36
.formatter (PLACEHOLDERS .toFormatter (player ))
40
37
.send ();
You can’t perform that action at this time.
0 commit comments