Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.5</version>
<version>2.12.1</version>
<scope>provided</scope>
</dependency>

Expand Down
1 change: 1 addition & 0 deletions Plugin/src/main/java/dev/lrxh/neptune/cache/Cache.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ public void load() {

public void save() {
SettingsLocale.SPAWN_LOCATION.set(LocationUtil.serialize(spawn));
SettingsLocale.SPAWN_LOCATION.getConfigFile().save();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import dev.lrxh.neptune.configs.impl.MessagesLocale;
import dev.lrxh.neptune.profile.data.SettingData;
import dev.lrxh.neptune.profile.impl.Profile;
import dev.lrxh.neptune.providers.clickable.Replacement;
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;

import org.bukkit.entity.Player;

public class FollowCommand {
Expand All @@ -27,11 +28,11 @@ public void follow(@Sender Player player, Player target) {

if (followingSettingData.getFollowings().contains(player.getUniqueId())) {
followingSettingData.removeFollower(player.getUniqueId());
MessagesLocale.STOP_FOLLOWING.send(player.getUniqueId(), new Replacement("<player>", target.getName()));
MessagesLocale.STOP_FOLLOWING.send(player.getUniqueId(), Placeholder.unparsed("player", target.getName()));
return;
}

API.getProfile(target.getUniqueId()).getSettingData().addFollower(player.getUniqueId());
MessagesLocale.START_FOLLOW.send(player.getUniqueId(), new Replacement("<player>", target.getName()));
MessagesLocale.START_FOLLOW.send(player.getUniqueId(), Placeholder.unparsed("player", target.getName()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,13 @@ public void initialize() {
ScoreboardLocale.TITLE.load();
CosmeticsLocale.LIGHTNING_DISPLAY_NAME.load();
SoundsLocale.MATCH_START.load();

HotbarLocale.LOBBY_PARTY_CREATE_NAME.update();
MessagesLocale.MATCH_FOUND.update();
SettingsLocale.SPAWN_LOCATION.update();
MenusLocale.FILTER_NAME.update();
ScoreboardLocale.TITLE.update();
CosmeticsLocale.LIGHTNING_DISPLAY_NAME.update();
SoundsLocale.MATCH_START.update();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ public String getHeader() {
public ConfigFile getConfigFile() {
return ConfigService.get().getCosmeticsConfig();
}

public void update() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,5 @@ public ConfigFile getConfigFile() {
public boolean resetUnknown() {
return false;
}
public void update() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ public enum MenusLocale implements IDataAccessor {
" &f&7* &fWins: &b<wins>",
" &f&7* &fElo: &b<elo>",
" &f&7* &fLosses: &b<losses>",
" &f&7* &fCurrent Streak: &b<currentStreak>",
" &f&7* &fBest Streak: &b<bestStreak>",
" &f&7* &fCurrent Streak: &b<current-win-streak>",
" &f&7* &fBest Streak: &b<best-win-streak>",
" &f&7* &fDivision: &b<division>",
" &f&7* &fK/D &b<kdr>"),
MATCH_LIST_TITLE("MATCH.LIST.TITLE", DataType.STRING, "&7Select Match"),
MATCH_LIST_SIZE("MATCH_LIST.SIZE", DataType.INT, "36"),
MATCH_LIST_STARTING_SLOT("MATCH_LIST.STARTING-SLOT", DataType.INT, "10"),
MATCH_LIST_FILTER("MATCH_LIST.FILTER-TYPE", "FILL, BORDER, NONE", DataType.STRING, "FILL"),
MATCH_LIST_ITEM_NAME("MATCH_LIST.ITEM.NAME", DataType.STRING,
"&c<playerRed_name> &7vs &9<playerBlue_name>"),
"&c<red-name> &7vs &9<blue-name>"),
MATCH_LIST_ITEM_LORE("MATCH_LIST.ITEM.LORE", DataType.STRING_LIST,
"&fArena: &b<arena>",
"&fKit: &b<kit>",
Expand Down Expand Up @@ -551,4 +551,18 @@ public String getHeader() {
public ConfigFile getConfigFile() {
return ConfigService.get().getMenusConfig();
}
public void update() {
getConfigFile().getConfiguration().set(MATCH_LIST_ITEM_NAME.getPath(),
MATCH_LIST_ITEM_NAME.getString()
.replaceAll("<playerRed_name>", "<red-name>")
.replaceAll("<playerBlue_name>", "<blue-name>")
);
getConfigFile().getConfiguration().set(STAT_LORE.getPath(),
STAT_LORE.getStringList().stream().map(str ->
str.replaceAll("<currentStreak>", "<current-win-streak>")
.replaceAll("<bestStreak>", "<best-win-streak>")
).toList()
);
getConfigFile().save();
}
}
Loading