-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ Rework HoverEvent to conform with new API
- Loading branch information
1 parent
03f5994
commit 4920490
Showing
3 changed files
with
34 additions
and
16 deletions.
There are no files selected for viewing
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
22 changes: 7 additions & 15 deletions
22
src/main/java/io/graversen/minecraft/rcon/commands/tellraw/HoverEvent.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 |
---|---|---|
@@ -1,20 +1,12 @@ | ||
package io.graversen.minecraft.rcon.commands.tellraw; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor(access = AccessLevel.PACKAGE) | ||
public class HoverEvent { | ||
private final String action; | ||
private final String value; | ||
|
||
public HoverEvent(String action, String value) { | ||
this.action = action; | ||
this.value = value; | ||
} | ||
|
||
public String getAction() { | ||
return action; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
private final TextContent[] contents; | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/io/graversen/minecraft/rcon/commands/tellraw/TextContent.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,26 @@ | ||
package io.graversen.minecraft.rcon.commands.tellraw; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class TextContent { | ||
private final String text; | ||
private final boolean bold; | ||
private final boolean italic; | ||
private final boolean underlined; | ||
private final boolean striketrough; | ||
private final boolean obfuscated; | ||
private final String color; | ||
|
||
public TextContent(TellRawCommand tellRawCommand) { | ||
this.text = tellRawCommand.getText(); | ||
this.bold = tellRawCommand.isBold(); | ||
this.italic = tellRawCommand.isItalic(); | ||
this.underlined = tellRawCommand.isUnderlined(); | ||
this.striketrough = tellRawCommand.isStriketrough(); | ||
this.obfuscated = tellRawCommand.isObfuscated(); | ||
this.color = tellRawCommand.getColor(); | ||
} | ||
} |