Skip to content

Commit 3c8aa2d

Browse files
committed
refactor(adventure-components): rename withoutItalic() to notItalic() for naming consistency
1 parent b98143d commit 3c8aa2d

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

playtime-core/src/main/java/com/github/imdmk/playtime/core/feature/playtime/top/gui/PlayTimeTopGuiConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public final class PlayTimeTopGuiConfig extends ConfigSection
7777
})
7878
public ItemGui playerEntryItem = ItemGui.builder()
7979
.material(Material.PLAYER_HEAD)
80-
.name(AdventureComponents.withoutItalics(
80+
.name(AdventureComponents.notItalic(
8181
"<dark_gray>• <yellow>#{PLAYER_POSITION} <gray>- <red>{PLAYER_NAME}"
8282
))
83-
.lore(AdventureComponents.withoutItalics(
83+
.lore(AdventureComponents.notItalic(
8484
" ",
8585
"<dark_gray>▸ <gray>PlayTime: <red>{PLAYER_PLAYTIME}",
8686
" "

playtime-core/src/main/java/com/github/imdmk/playtime/core/platform/adventure/AdventureComponents.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ public static List<Component> text(Iterable<? extends CharSequence> texts) {
3939
return List.copyOf(out);
4040
}
4141

42-
public static Component withoutItalics(Component component) {
42+
public static Component notItalic(Component component) {
4343
return component.decoration(TextDecoration.ITALIC, false);
4444
}
4545

46-
public static Component withoutItalics(CharSequence text) {
47-
return withoutItalics(text(text));
46+
public static Component notItalic(CharSequence text) {
47+
return notItalic(text(text));
4848
}
4949

50-
public static Component withoutItalics(ComponentLike like) {
50+
public static Component notItalic(ComponentLike like) {
5151
return like.asComponent().decoration(TextDecoration.ITALIC, false);
5252
}
5353

54-
public static List<Component> withoutItalics(String... strings) {
54+
public static List<Component> notItalic(String... strings) {
5555
List<Component> out = new ArrayList<>();
5656
for (String string : strings) {
57-
out.add(withoutItalics(string));
57+
out.add(notItalic(string));
5858
}
5959

6060
return List.copyOf(out);

playtime-core/src/main/java/com/github/imdmk/playtime/core/platform/gui/config/NavigationBarConfig.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public final class NavigationBarConfig extends OkaeriConfig {
1818
})
1919
public ItemGui nextItem = ItemGui.builder()
2020
.material(Material.ARROW)
21-
.name(AdventureComponents.withoutItalics("<green>Next page"))
22-
.lore(AdventureComponents.withoutItalics(
21+
.name(AdventureComponents.notItalic("<green>Next page"))
22+
.lore(AdventureComponents.notItalic(
2323
" ",
2424
"<gray>Click <red>RIGHT <gray>to go to the next page",
2525
" "
@@ -35,8 +35,8 @@ public final class NavigationBarConfig extends OkaeriConfig {
3535
})
3636
public ItemGui noNextItem = ItemGui.builder()
3737
.material(Material.BARRIER)
38-
.name(AdventureComponents.withoutItalics("<red>There's no next page!"))
39-
.lore(AdventureComponents.withoutItalics(
38+
.name(AdventureComponents.notItalic("<red>There's no next page!"))
39+
.lore(AdventureComponents.notItalic(
4040
" ",
4141
"<red>Sorry, there is no next page available.",
4242
" "
@@ -53,8 +53,8 @@ public final class NavigationBarConfig extends OkaeriConfig {
5353
})
5454
public ItemGui previousItem = ItemGui.builder()
5555
.material(Material.ARROW)
56-
.name(AdventureComponents.withoutItalics("<green>Previous page"))
57-
.lore(AdventureComponents.withoutItalics(
56+
.name(AdventureComponents.notItalic("<green>Previous page"))
57+
.lore(AdventureComponents.notItalic(
5858
" ",
5959
"<gray>Click <red>LEFT <gray>to go to the previous page",
6060
" "
@@ -70,8 +70,8 @@ public final class NavigationBarConfig extends OkaeriConfig {
7070
})
7171
public ItemGui noPreviousItem = ItemGui.builder()
7272
.material(Material.BARRIER)
73-
.name(AdventureComponents.withoutItalics("<red>There's no previous page!"))
74-
.lore(AdventureComponents.withoutItalics(
73+
.name(AdventureComponents.notItalic("<red>There's no previous page!"))
74+
.lore(AdventureComponents.notItalic(
7575
" ",
7676
"<red>Sorry, there is no previous page available.",
7777
" "
@@ -87,8 +87,8 @@ public final class NavigationBarConfig extends OkaeriConfig {
8787
})
8888
public ItemGui exitItem = ItemGui.builder()
8989
.material(Material.ACACIA_BUTTON)
90-
.name(AdventureComponents.withoutItalics("<red>Exit GUI"))
91-
.lore(AdventureComponents.withoutItalics(
90+
.name(AdventureComponents.notItalic("<red>Exit GUI"))
91+
.lore(AdventureComponents.notItalic(
9292
" ",
9393
"<gray>Click <red>LEFT <gray>to exit this GUI",
9494
" "

0 commit comments

Comments
 (0)