-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rework message types and update custom characters (#285)
- Loading branch information
1 parent
c77ff75
commit 4ce8f20
Showing
14 changed files
with
166 additions
and
120 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
src/main/java/minevalley/core/api/chat/types/ActionBarType.java
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
src/main/java/minevalley/core/api/chat/types/MessageType.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...valley/core/api/chat/MessageReceiver.java → ...y/core/api/messaging/MessageReceiver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...nevalley/core/api/chat/MessageSender.java → ...ley/core/api/messaging/MessageSender.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ley/core/api/chat/clickable/ChatMenu.java → ...ore/api/messaging/clickable/ChatMenu.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...e/api/chat/clickable/ClickableOption.java → .../messaging/clickable/ClickableOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ore/api/chat/instruction/Instruction.java → ...pi/messaging/instruction/Instruction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/minevalley/core/api/messaging/types/ActionBarType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package minevalley.core.api.messaging.types; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import minevalley.core.api.enums.CustomCharacter; | ||
import net.kyori.adventure.text.Component; | ||
import net.kyori.adventure.text.TextComponent; | ||
import net.kyori.adventure.text.format.NamedTextColor; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import static minevalley.core.api.enums.CustomCharacter.CHECKMARK; | ||
import static minevalley.core.api.enums.CustomCharacter.CROSS; | ||
import static net.kyori.adventure.text.format.NamedTextColor.*; | ||
|
||
@Getter(onMethod_ = @Nonnull) | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum ActionBarType { | ||
|
||
/** | ||
* Used to signal the failure of a process or an action. | ||
*/ | ||
ERROR(CROSS, RED), | ||
|
||
/** | ||
* Used to signal the success of a process or action. | ||
*/ | ||
SUCCESS(CHECKMARK, GREEN); | ||
|
||
private final CustomCharacter symbol; | ||
private final NamedTextColor color; | ||
|
||
@SuppressWarnings("unused") | ||
public TextComponent getPrefix() { | ||
return Component.space() | ||
.append(Component.text(symbol.getChar(), color)) | ||
.append(Component.text(" ━ ", DARK_GRAY)); | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
src/main/java/minevalley/core/api/messaging/types/MessageType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package minevalley.core.api.messaging.types; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
import minevalley.core.api.enums.CustomCharacter; | ||
import net.kyori.adventure.text.Component; | ||
import net.kyori.adventure.text.TextComponent; | ||
import net.kyori.adventure.text.format.NamedTextColor; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import static minevalley.core.api.enums.CustomCharacter.*; | ||
import static net.kyori.adventure.text.format.NamedTextColor.*; | ||
|
||
@Getter(onMethod_ = @Nonnull) | ||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE) | ||
public enum MessageType { | ||
|
||
/** | ||
* Used to signal a warning. | ||
*/ | ||
WARNING(EXCLAMATION_MARK, YELLOW), | ||
|
||
/** | ||
* Used to signal the failure of a process or an action. | ||
*/ | ||
ERROR(CROSS, RED), | ||
|
||
/** | ||
* Used to signal the success of a process or action. | ||
*/ | ||
SUCCESS(CHECKMARK, GREEN), | ||
|
||
/** | ||
* Used to signal an information. | ||
*/ | ||
INFO(MV, WHITE), | ||
|
||
/** | ||
* Used to signal an information in black and white. | ||
*/ | ||
INFO_BW(MV_BW, WHITE); | ||
|
||
private final CustomCharacter symbol; | ||
private final NamedTextColor color; | ||
|
||
@SuppressWarnings("unused") | ||
public TextComponent getPrefix() { | ||
return Component.space() | ||
.append(Component.text(symbol.getChar(), color)) | ||
.append(Component.text(" ━ ", DARK_GRAY)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters