Skip to content

Commit

Permalink
Follow team review.
Browse files Browse the repository at this point in the history
  • Loading branch information
imDMK committed Feb 15, 2025
1 parent 315762b commit 4128379
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.time.Duration;
import java.time.Instant;

@Command(name = "seen")
@Command(name = "seen", aliases = { "lastonline" })
@Permission("eternalcore.seen")
class SeenCommand {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.eternalcode.core.feature.seen.messages;

import com.eternalcode.multification.notice.Notice;
import lombok.Getter;
import lombok.experimental.Accessors;
import net.dzikoysk.cdn.entity.Contextual;
import net.dzikoysk.cdn.entity.Description;

@Getter
@Accessors(fluent = true)
@Contextual
public class EnSeenMessages {

@Description("# {PLAYER} - The player who is never played before on the server")
public Notice neverPlayedBefore = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} has not played before on this server.");

@Description("# {PLAYER} - The player who was last seen on the server, {SEEN} - Time since last login")
public Notice lastSeen = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} was last seen {SEEN} ago.");

@Description("# {PLAYER} - The player who is now online")
public Notice nowOnline = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} is now online!");

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.eternalcode.core.feature.seen.messages;

import com.eternalcode.multification.notice.Notice;
import lombok.Getter;
import lombok.experimental.Accessors;
import net.dzikoysk.cdn.entity.Contextual;
import net.dzikoysk.cdn.entity.Description;

@Getter
@Accessors(fluent = true)
@Contextual
public class PLSeenMessages implements SeenMessages {

@Description("# {PLAYER} - Gracz który nigdy nie grał na serwerze")
public Notice neverPlayedBefore = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} nie grał nigdy na tym serwerze.");

@Description("# {PLAYER} - Gracz który ostatnio był widziany na serwerze, {SEEN} - Czas od ostatniego logowania")
public Notice lastSeen = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} był ostatnio widziany {SEEN} temu.");

@Description("# {PLAYER} - Gracz który jest aktualnie online")
public Notice nowOnline = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} jest aktualnie online!");

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.eternalcode.core.feature.seen.messages;

import com.eternalcode.multification.notice.Notice;

public interface SeenMessages {

Notice neverPlayedBefore();
Notice lastSeen();
Notice nowOnline();

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.eternalcode.core.feature.language.Language;
import com.eternalcode.core.feature.privatechat.messages.PrivateChatMessages;
import com.eternalcode.core.feature.randomteleport.messages.RandomTeleportMessages;
import com.eternalcode.core.feature.seen.messages.SeenMessages;
import com.eternalcode.core.feature.setslot.messages.SetSlotMessages;
import com.eternalcode.core.feature.spawn.messages.SpawnMessages;
import com.eternalcode.core.feature.sudo.messages.SudoMessages;
Expand Down Expand Up @@ -101,12 +102,6 @@ interface InventorySection {
String disposalTitle();
}

interface SeenSection {
Notice neverPlayedBefore();
Notice lastSeen();
Notice nowOnline();
}

interface PlayerSection {
// feed
Notice feedMessage();
Expand Down Expand Up @@ -226,7 +221,7 @@ interface ContainerSection {
// player section
PlayerSection player();
//Seen section
SeenSection seen();
SeenMessages seen();
// spawn section
SpawnMessages spawn();
// set slot section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.eternalcode.core.feature.home.messages.ENHomeMessages;
import com.eternalcode.core.feature.jail.messages.ENJailMessages;
import com.eternalcode.core.feature.language.Language;
import com.eternalcode.core.feature.seen.messages.EnSeenMessages;
import com.eternalcode.core.feature.setslot.messages.ENSetSlotMessages;
import com.eternalcode.core.feature.privatechat.messages.ENPrivateMessages;
import com.eternalcode.core.feature.randomteleport.messages.ENRandomTeleportMessages;
Expand Down Expand Up @@ -135,21 +136,7 @@ public static class ENFormatSection implements Format {
" ",
"# This section is responsible for the messages of the /seen command"
})
public ENSeenSection seen = new ENSeenSection();

@Getter
@Contextual
public static class ENSeenSection implements SeenSection {

@Description("# {PLAYER} - The player who is never played before on the server")
public Notice neverPlayedBefore = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} has not played before on this server.");

@Description("# {PLAYER} - The player who was last seen on the server, {SEEN} - Time since last login")
public Notice lastSeen = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} was last seen {SEEN} ago.");

@Description("# {PLAYER} - The player who is now online")
public Notice nowOnline = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} is now online!");
}
public EnSeenMessages seen = new EnSeenMessages();

@Description({
" ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.eternalcode.core.feature.home.messages.PLHomeMessages;
import com.eternalcode.core.feature.jail.messages.PLJailMessages;
import com.eternalcode.core.feature.language.Language;
import com.eternalcode.core.feature.seen.messages.PLSeenMessages;
import com.eternalcode.core.feature.setslot.messages.PLSetSlotMessages;
import com.eternalcode.core.feature.privatechat.messages.PLPrivateChatMessages;
import com.eternalcode.core.feature.randomteleport.messages.PLRandomTeleportMessages;
Expand Down Expand Up @@ -144,21 +145,7 @@ public static class PLFormatSection implements Format {
" ",
"# Ta sekcja odpowiada za wiadomości komendy /seen"
})
public PLSeenSection seen = new PLSeenSection();

@Getter
@Contextual
public static class PLSeenSection implements SeenSection {

@Description("# {PLAYER} - Gracz który nigdy nie grał na serwerze")
public Notice neverPlayedBefore = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} nie grał nigdy na tym serwerze.");

@Description("# {PLAYER} - Gracz który ostatnio był widziany na serwerze, {SEEN} - Czas od ostatniego logowania")
public Notice lastSeen = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} był ostatnio widziany {SEEN} temu.");

@Description("# {PLAYER} - Gracz który jest aktualnie online")
public Notice nowOnline = Notice.chat("<dark_gray>[<dark_red>Seen<dark_gray>] <green>{PLAYER} jest aktualnie online!");
}
public PLSeenMessages seen = new PLSeenMessages();

@Description({
" ",
Expand Down

0 comments on commit 4128379

Please sign in to comment.