Skip to content

Commit 7b8e6b6

Browse files
committed
Added common game win and lose messages
1 parent 7e04cd0 commit 7b8e6b6

File tree

1 file changed

+112
-0
lines changed

1 file changed

+112
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
package dev.emortal.minestom.gamesdk.util;
2+
3+
import org.jetbrains.annotations.NotNull;
4+
5+
import java.util.ArrayList;
6+
import java.util.Arrays;
7+
import java.util.List;
8+
import java.util.concurrent.ThreadLocalRandom;
9+
10+
public final class GameWinLoseMessages {
11+
12+
public static final Registry VICTORY = new Registry();
13+
public static final Registry DEFEAT = new Registry();
14+
15+
static {
16+
VICTORY.registerAll(
17+
"pepeD",
18+
"gg ez no re",
19+
"All luck",
20+
"NoHacksJustSkill",
21+
"Were you hacking?",
22+
"Were you teaming?",
23+
"no skill issues here",
24+
"i am better",
25+
"I dropped my popcorn",
26+
"Defeat... but not for you",
27+
"Teamwork makes the dream work",
28+
"vic roy",
29+
"call an ambulance... but not for me",
30+
"What chair do you have?",
31+
"I won? It must have been my chair!",
32+
"No GC this time",
33+
"Moulberry is proud of you",
34+
"tryhard == true",
35+
"touch grass",
36+
"take a shower",
37+
"take a cookie for your efforts",
38+
"[username] never dies!",
39+
"average rust enjoyer",
40+
"average valence enjoyer",
41+
"average minestom enjoyer",
42+
"i wasn't looking, do it again",
43+
"built different",
44+
"carried",
45+
"don't forget to breathe!",
46+
"want a medal?",
47+
"you lost the game",
48+
"BLEHHH"
49+
);
50+
DEFEAT.registerAll(
51+
"I guess you weren't trying",
52+
"no",
53+
"L",
54+
"rip bozo",
55+
"no zaza??",
56+
"what is your excuse?",
57+
"skill issue",
58+
"uffeyman was here",
59+
"Better luck next time!",
60+
"Worse luck next time!",
61+
"Should have used a Minestom client",
62+
"Teamwork... towards defeat",
63+
"No one matches your skill... at losing",
64+
"Victory... but not for you",
65+
"You tried and that's what matters!",
66+
"Zzzzzz",
67+
"Did your cat step on your keyboard?",
68+
"PepeHands",
69+
"At least someone won, too bad it wasn't you",
70+
"cry about it",
71+
"were you afk?",
72+
"smh my head",
73+
"I bet you didn't even say good game",
74+
"You did your best... but it wasn't enough",
75+
"\"i lagged\" said an Australian",
76+
"If I had a dollar every time you won a game, I'd be in crippling debt",
77+
"widepeepoSad",
78+
"try harder",
79+
"You clearly weren't using Graphite",
80+
"I saw the GC spike",
81+
"python user",
82+
"BLEHHH",
83+
"Kotlin user"
84+
);
85+
}
86+
87+
private GameWinLoseMessages() {
88+
}
89+
90+
public static final class Registry {
91+
92+
private final List<String> messages = new ArrayList<>();
93+
94+
public @NotNull String random() {
95+
int length = this.messages.size();
96+
int randomIndex = ThreadLocalRandom.current().nextInt(length);
97+
return this.messages.get(randomIndex);
98+
}
99+
100+
public void register(@NotNull String message) {
101+
this.messages.add(message);
102+
}
103+
104+
public void registerAll(@NotNull String... messages) {
105+
this.messages.addAll(Arrays.asList(messages));
106+
}
107+
108+
public void reset() {
109+
this.messages.clear();
110+
}
111+
}
112+
}

0 commit comments

Comments
 (0)