Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0eeffd9
feat: start working on replays
ArikSquad Jan 31, 2026
afad414
feat: clean ups
ArikSquad Feb 1, 2026
f473872
feat: lean more on events
ArikSquad Feb 1, 2026
b094592
refactor: proper times on Phases
ArikSquad Feb 1, 2026
45e1ce2
feat: disable respawn screen
ArikSquad Feb 1, 2026
d5ff9c1
feat: GameStartEvent
ArikSquad Feb 1, 2026
4a5cd80
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 1, 2026
b54ec25
feat: cleaning up
ArikSquad Feb 2, 2026
e6234d4
feat: make replays basically viewable
ArikSquad Feb 2, 2026
502599b
feat: add some extra things
ArikSquad Feb 3, 2026
255d75a
refactor: clean up
ArikSquad Feb 3, 2026
9b22afb
feat: recordables and views
ArikSquad Feb 4, 2026
12dc33d
fix: remove useless RecordablePlayerBlockChange
ArikSquad Feb 4, 2026
7672cba
feat: cleaning and roadmap comments
ArikSquad Feb 4, 2026
fe0ccab
fix: removed method usage
ArikSquad Feb 4, 2026
7a1678d
refactor: type.game module
ArikSquad Feb 5, 2026
f6e7e36
fix(orchestrator): correct import for GameObject
ArikSquad Feb 5, 2026
9bb2435
fix(replay): use game module
ArikSquad Feb 5, 2026
60e21f0
refactor: use StringUtility#getAsRomanNumeral
ArikSquad Feb 5, 2026
0c2e54d
feat: correct scoreboard
ArikSquad Feb 7, 2026
0b2a5f8
feat: replay inventory & generator block
ArikSquad Feb 7, 2026
cfe7c24
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 8, 2026
993f925
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 8, 2026
b5d984b
feat: replay sound & particles
ArikSquad Feb 8, 2026
4791e1d
fix: proper replay items
ArikSquad Feb 8, 2026
e51e286
refactor: move leave to event listener
ArikSquad Feb 8, 2026
0d6b420
feat: move to events
ArikSquad Feb 8, 2026
2b10648
refactor: clean-ups
ArikSquad Feb 8, 2026
f95c331
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 9, 2026
15458de
feat: replays gui accuracy
ArikSquad Feb 9, 2026
ff8bdcf
refactor: move to listener
ArikSquad Feb 9, 2026
642417f
refactor: move to listener
ArikSquad Feb 9, 2026
cef3f0b
fix(bw): game behavior
ArikSquad Feb 9, 2026
72dacc1
fix(bw): waiting scoreboard
ArikSquad Feb 9, 2026
15833a1
feat: version const
ArikSquad Feb 9, 2026
43fd745
refactor: accurate messages
ArikSquad Feb 9, 2026
ddce877
feat: translator
ArikSquad Feb 9, 2026
d2c633b
feat(bw): proper death messages
ArikSquad Feb 9, 2026
cbdafa1
feat(bw): actually proper death messages
ArikSquad Feb 9, 2026
2cb9d45
feat(bw): actually proper death messages
ArikSquad Feb 9, 2026
a37e1db
revert: translations
ArikSquad Feb 10, 2026
85b6e24
feat: more functionality
ArikSquad Feb 10, 2026
242dca8
feat: even more functionality
ArikSquad Feb 10, 2026
b8ce5b3
feat: end game messages
ArikSquad Feb 10, 2026
aed6fe8
feat: user obfuscation, tab list and belowNameTag
ArikSquad Feb 10, 2026
3305da4
feat: start using invisibility and adventure instead of spectator
ArikSquad Feb 10, 2026
5364143
feat: correct death and respawn
ArikSquad Feb 11, 2026
5f833c6
feat: use RespawnHandler
ArikSquad Feb 11, 2026
ffd900b
fix: game ending
ArikSquad Feb 11, 2026
e307104
feat: countdown stop message
ArikSquad Feb 11, 2026
a9702ca
feat: add feature missing notifications
ArikSquad Feb 11, 2026
79731b4
feat: finalise some systems
ArikSquad Feb 12, 2026
bcd9091
feat: hotbar manager
ArikSquad Feb 13, 2026
b49765f
feat: better looking deposit messages
ArikSquad Feb 13, 2026
9c4cd2c
fix: death velocity, deposit message, allow other modes than SOLO
ArikSquad Feb 13, 2026
ed31022
feat: move NPCS to correct positions
ArikSquad Feb 14, 2026
0cb6442
feat: remove passthrough as-is
ArikSquad Feb 14, 2026
f457b7c
feat: TeamEliminatedEvent proper usage
ArikSquad Feb 14, 2026
9bb086f
feat: hide scoreboard NumberFormat
ArikSquad Feb 17, 2026
28d98a5
fix: comment limboServer
ArikSquad Feb 17, 2026
253529c
feat: support 2+ teams properly
ArikSquad Feb 17, 2026
543035b
fix(view): check if ViewSession is null
ArikSquad Feb 17, 2026
5a9f8ba
refactor: clean up generator config
ArikSquad Feb 17, 2026
7caf133
feat: HypixelPosition and Rays
ArikSquad Feb 17, 2026
26d4515
Merge branch 'master' into feat/replay
ArikSquad Feb 18, 2026
f669419
fix: remove merge artifacts
ArikSquad Feb 18, 2026
3ea476a
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 24, 2026
10354d6
feat: message after game
ArikSquad Feb 24, 2026
491a8ca
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 26, 2026
63c6a6c
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Feb 27, 2026
0f89ce1
fix: somehow "'t" had been replaced with "'distance"
ArikSquad Feb 27, 2026
bb04fe2
feat: add translations
ArikSquad Feb 27, 2026
785b5c2
feat: continue this
ArikSquad Mar 2, 2026
7f346e7
feat: add more i18n messages
ArikSquad Mar 2, 2026
90f8fc1
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Mar 23, 2026
cb73fea
fix: failed merge with missing imports
ArikSquad Apr 6, 2026
075c8f6
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Apr 16, 2026
be05f7d
fix: let us build once again
ArikSquad Apr 17, 2026
4d7864b
feat: continue replay system
ArikSquad Apr 17, 2026
0b891e3
fix: remove this horrible implementation of anti-air-jump
ArikSquad Apr 17, 2026
4ae3408
feat: replay following, views
ArikSquad Apr 17, 2026
8d65c9b
fix: don't log for no reason
ArikSquad Apr 17, 2026
50bf386
feat: initial teleport and glow
ArikSquad Apr 17, 2026
9303251
feat: seeking state
ArikSquad Apr 17, 2026
6514357
feat: port GUIMapSelection to views
ArikSquad Apr 17, 2026
f1feb67
feat: compass
ArikSquad Apr 17, 2026
53f24c8
fix: accidental old search and replace
ArikSquad Apr 17, 2026
11f2911
feat: better matchmaking
ArikSquad Apr 18, 2026
402835e
feat: lobby and view v2 migrations
ArikSquad Apr 18, 2026
7165401
feat: GUIGameMenu more items
ArikSquad Apr 18, 2026
ade49a4
feat: continue
ArikSquad Apr 18, 2026
3ac4646
feat: lock in party behavior
ArikSquad Apr 18, 2026
06b7219
feat: sloppy collectibles
ArikSquad Apr 19, 2026
762ad04
Merge remote-tracking branch 'origin/master' into feat/replay
ArikSquad Apr 19, 2026
b090695
feat: update to match main
ArikSquad Apr 19, 2026
908371f
feat: improve scoreboards, continue cosmetics
ArikSquad Apr 19, 2026
6831ce1
feat: improve NPC holograms a lot
ArikSquad Apr 19, 2026
6f3f181
fix: bedwars scoreboard format
ArikSquad Apr 19, 2026
d357cce
feat: make things properly purchasable
ArikSquad Apr 19, 2026
9edc0a4
fix: don't set CUSTOM_NAME
ArikSquad Apr 19, 2026
bb2a943
feat: add alias for lobby command
ArikSquad Apr 19, 2026
027273f
feat: originServer as self on initial connection
ArikSquad Apr 19, 2026
a7c2ebd
fix: lobby items timing
ArikSquad Apr 19, 2026
ff98dde
feat: generic FloatingBlockEntity for future uses
ArikSquad Apr 20, 2026
e900931
refactor: useless stuff
ArikSquad Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
116 changes: 116 additions & 0 deletions commons/src/main/java/net/swofty/commons/LobbyDestination.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package net.swofty.commons;

import org.jetbrains.annotations.Nullable;

import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.Locale;
import java.util.Set;

public enum LobbyDestination {
BEDWARS(
ServerType.BEDWARS_LOBBY,
Set.of("bw", "bedwars"),
Set.of(ServerType.BEDWARS_LOBBY, ServerType.BEDWARS_GAME, ServerType.BEDWARS_CONFIGURATOR)
),
SKYWARS(
ServerType.SKYWARS_LOBBY,
Set.of("sw", "skywars"),
Set.of(ServerType.SKYWARS_LOBBY, ServerType.SKYWARS_GAME, ServerType.SKYWARS_CONFIGURATOR)
),
MURDER_MYSTERY(
ServerType.MURDER_MYSTERY_LOBBY,
Set.of("mm", "murder", "murdermystery", "murder_mystery", "mystery"),
Set.of(ServerType.MURDER_MYSTERY_LOBBY, ServerType.MURDER_MYSTERY_GAME, ServerType.MURDER_MYSTERY_CONFIGURATOR)
),
SKYBLOCK(
ServerType.SKYBLOCK_HUB,
Set.of("sb", "skyblock", "hub"),
Set.of()
),
PROTOTYPE(
ServerType.PROTOTYPE_LOBBY,
Set.of("prototype", "proto", "ptl"),
Set.of(ServerType.PROTOTYPE_LOBBY, ServerType.REPLAY_VIEWER)
),
RAVENGARD(
ServerType.RAVENGARD_LOBBY,
Set.of("ravengard", "rg"),
Set.of(ServerType.RAVENGARD_LOBBY)
);

private final ServerType destination;
private final Set<String> aliases;
private final Set<ServerType> sourceTypes;

LobbyDestination(ServerType destination, Set<String> aliases, Set<ServerType> sourceTypes) {
this.destination = destination;
this.aliases = aliases;
this.sourceTypes = sourceTypes;
}

public ServerType destination() {
return destination;
}

public static @Nullable ServerType resolveFromAlias(String alias) {
String normalized = normalize(alias);
if (normalized.isEmpty()) {
return null;
}

for (LobbyDestination value : values()) {
if (value.aliases.contains(normalized)) {
return value.destination;
}
}

return null;
}

public static ServerType resolveDefaultDestination(@Nullable ServerType currentType) {
if (currentType == null) {
return ServerType.PROTOTYPE_LOBBY;
}

for (LobbyDestination value : values()) {
if (value.handlesSource(currentType)) {
return value.destination;
}
}

return ServerType.PROTOTYPE_LOBBY;
}

public static @Nullable ServerType resolveDestination(@Nullable String alias, @Nullable ServerType currentType) {
if (alias != null && !alias.isBlank()) {
return resolveFromAlias(alias);
}
return resolveDefaultDestination(currentType);
}

public static Set<String> allAliases() {
Set<String> all = new LinkedHashSet<>();
Arrays.stream(values()).forEach(value -> all.addAll(value.aliases));
return all;
}

private boolean handlesSource(ServerType sourceType) {
if (this == SKYBLOCK) {
return sourceType.isSkyBlock();
}
return sourceTypes.contains(sourceType);
}

private static String normalize(String value) {
if (value == null) {
return "";
}

return value
.toLowerCase(Locale.ROOT)
.replace("_", "")
.replace("-", "")
.replace(" ", "");
}
}
93 changes: 0 additions & 93 deletions commons/src/main/java/net/swofty/commons/SentryWriter.java

This file was deleted.

3 changes: 2 additions & 1 deletion commons/src/main/java/net/swofty/commons/ServerType.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public enum ServerType {
SKYWARS_LOBBY(false),
SKYWARS_GAME(false),
SKYWARS_CONFIGURATOR(false),
RAVENGARD_LOBBY(false)
RAVENGARD_LOBBY(false),
REPLAY_VIEWER(false)
;

private final boolean isSkyBlock;
Expand Down
1 change: 1 addition & 0 deletions commons/src/main/java/net/swofty/commons/ServiceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum ServiceType {
DARK_AUCTION,
ORCHESTRATOR,
FRIEND,
REPLAY,
PUNISHMENT,
ELECTION,
;
Expand Down
21 changes: 20 additions & 1 deletion commons/src/main/java/net/swofty/commons/StringUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public static String getTextFromComponent(Component component) {
}

public static String getAuctionSetupFormattedTime(long millis) {
return formatTimeLeft(millis).replaceAll(" ", "")
return formatTimeLeft(millis).replace(" ", "")
.replaceAll("s$", "");
}

Expand Down Expand Up @@ -435,6 +435,25 @@ public static String ntify(int i) {
};
}

/**
* Capitalizes the first letter of each word in the input string and lowercases the rest of the letters in each word.
* @param input The string to capitalize.
* @return The input string with the first letter of each word capitalized and the rest lowercased. If the input is null or empty, it returns the input as is.
*/
public static String capitalizeSentence(String input) {
if (input == null || input.isEmpty()) {
return input;
}
String[] words = input.split(" ");
StringBuilder capitalized = new StringBuilder();
for (String word : words) {
if (!word.isEmpty()) {
capitalized.append(capitalize(word)).append(" ");
}
}
return capitalized.toString().trim();
}

public static long parseDuration(String duration) {
long totalMillis = 0;
Pattern pattern = Pattern.compile("(\\d+)([dhms])");
Expand Down
20 changes: 5 additions & 15 deletions commons/src/main/java/net/swofty/commons/Tuple.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package net.swofty.commons;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class Tuple<A, B> {
private A key;
private B value;
Expand All @@ -9,19 +14,4 @@ public Tuple(A key, B value) {
this.value = value;
}

public void setKey(A key) {
this.key = key;
}

public void setValue(B value) {
this.value = value;
}

public A getKey() {
return key;
}

public B getValue() {
return value;
}
}
7 changes: 7 additions & 0 deletions commons/src/main/java/net/swofty/commons/VersionConst.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package net.swofty.commons;

public class VersionConst {

public static String BED_WARS_VERSION = "1.10";

}
Loading
Loading