Skip to content

Commit 5b356e6

Browse files
authored
Merge pull request #1 from metacraftsmp/meta
add roleplay
2 parents 12fbf3e + ebfbf54 commit 5b356e6

File tree

7 files changed

+18
-2
lines changed

7 files changed

+18
-2
lines changed

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Status
2+
This mod is a fork of the original project available at [henkelmax Github](https://github.com/henkelmax/status) for metacraft SMP.
3+
- add Role play Status
4+
5+
---
26

37
A [Fabric](https://fabricmc.net/) mod that enables you to set a status.
48

src/main/java/de/maxhenkel/status/gui/StatusScreen.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ public class StatusScreen extends StatusScreenBase {
1515
private static final ResourceLocation OUTLINE = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/outline.png");
1616
private static final ResourceLocation NO_AVAILABILITY = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/no_availability.png");
1717
private static final ResourceLocation DND = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/dnd.png");
18+
private static final ResourceLocation RP_ONLY = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/rp_only.png");
1819
private static final ResourceLocation OPEN = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/open.png");
1920
private static final ResourceLocation NEUTRAL = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/neutral.png");
2021
private static final ResourceLocation RECORDING = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/recording.png");
2122
private static final ResourceLocation STREAMING = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/streaming.png");
2223

2324
public StatusScreen() {
24-
super(Component.translatable("gui.status.title"), 145, 184);
25+
super(Component.translatable("gui.status.title"), 145, 210);
2526
}
2627

2728
@Override
@@ -41,6 +42,10 @@ protected void init() {
4142
addRenderableWidget(dnd);
4243
y += height + 1;
4344

45+
AvailabilityButton rp_only = new AvailabilityButton(x, y, width, height, Component.translatable("message.status.rp_only"), Availability.RP_ONLY);
46+
addRenderableWidget(rp_only);
47+
y += height + 1;
48+
4449
AvailabilityButton open = new AvailabilityButton(x, y, width, height, Component.translatable("message.status.open"), Availability.OPEN);
4550
addRenderableWidget(open);
4651
y += height + 5;
@@ -91,6 +96,9 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
9196
renderIcon(guiGraphics, DND, x, y + 2);
9297
y += height + 1;
9398

99+
renderIcon(guiGraphics, RP_ONLY, x, y + 2);
100+
y += height + 1;
101+
94102
renderIcon(guiGraphics, OPEN, x, y + 2);
95103
y += height + 5;
96104

src/main/java/de/maxhenkel/status/playerstate/Availability.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public enum Availability {
44

5-
NONE(""), DO_NOT_DISTURB("do_not_disturb"), OPEN("open");
5+
NONE(""), DO_NOT_DISTURB("do_not_disturb"), OPEN("open"), RP_ONLY("rp_only");
66

77
private final String name;
88

src/main/java/de/maxhenkel/status/playerstate/ClientPlayerStateManager.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public PlayerState getState(UUID player) {
117117
}
118118

119119
private static final ResourceLocation DND = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/dnd.png");
120+
private static final ResourceLocation RP_ONLY = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/rp_only.png");
120121
private static final ResourceLocation OPEN = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/open.png");
121122
private static final ResourceLocation NO_AVAILABILITY = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/no_availability.png");
122123
private static final ResourceLocation RECORDING = ResourceLocation.fromNamespaceAndPath(Status.MODID, "textures/icons/recording.png");
@@ -148,6 +149,8 @@ public ResourceLocation getOverlay(UUID player) {
148149
return DND;
149150
} else if (state.getAvailability().equals(Availability.OPEN)) {
150151
return OPEN;
152+
} else if (state.getAvailability().equals(Availability.RP_ONLY)) {
153+
return RP_ONLY;
151154
}
152155
return NO_AVAILABILITY;
153156
}

src/main/resources/assets/status/lang/en_us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"message.status.incompatible_version": "Your status version is not compatible with the servers version.\nPlease install version %s of %s.",
88
"message.status.no_availability": "No Availability",
99
"message.status.do_not_disturb": "Do Not Disturb",
10+
"message.status.rp_only": "Role Play Only",
1011
"message.status.open": "Open",
1112
"message.status.recording": "Recording",
1213
"message.status.streaming": "Streaming",
-5.77 KB
Loading
135 Bytes
Loading

0 commit comments

Comments
 (0)