Skip to content

Commit

Permalink
New Chunk restore system using NMS and renamed LOBBY -> IN_LOBBY
Browse files Browse the repository at this point in the history
  • Loading branch information
Devlrxxh committed Jun 26, 2024
1 parent 5d844e3 commit 3bff8bd
Show file tree
Hide file tree
Showing 24 changed files with 82 additions and 85 deletions.
7 changes: 1 addition & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,10 @@
<scope>system</scope>
<systemPath>${project.basedir}/libs/fawe.jar</systemPath>
</dependency>
<dependency>
<groupId>dev.lrxh</groupId>
<artifactId>Build</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>dev.lrxh</groupId>
<artifactId>Shared</artifactId>
<artifactId>Build</artifactId>
<version>1.0</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.bukkit.Chunk;
import org.bukkit.ChunkSnapshot;
import org.bukkit.Location;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;



@Getter
@Setter
@SuperBuilder
public class StandAloneArena extends Arena {
private transient ConcurrentLinkedHashMap<Chunk, ChunkSnapshot> chunkSnapshots;
private transient ConcurrentLinkedHashMap<Chunk, Object[]> chunkSnapshots;
private Location min;
private Location max;
private double deathY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void reset(Player player, String kitName) {
(Arrays.asList(player.getInventory().getContents()));

MessagesLocale.KIT_EDITOR_STOP.send(player.getUniqueId());
profile.setState(ProfileState.LOBBY);
profile.setState(ProfileState.IN_LOBBY);
}

MessagesLocale.KIT_EDITOR_RESET.send(player.getUniqueId(), new Replacement("<kit>", kit.getDisplayName()));
Expand Down
50 changes: 25 additions & 25 deletions src/main/java/dev/lrxh/neptune/configs/impl/HotbarLocale.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
import dev.lrxh.neptune.utils.ConfigFile;
import lombok.Getter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Getter
public enum HotbarLocale implements IDataAccessor {
LOBBY_UNRANKED_NAME("ITEMS.LOBBY.UNRANKED.NAME", null, DataType.STRING, "&aQueue Match &7(Right Click)"),
LOBBY_UNRANKED_MATERIAL("ITEMS.LOBBY.UNRANKED.MATERIAL", null, DataType.STRING, "IRON_SWORD"),
LOBBY_UNRANKED_SLOT("ITEMS.LOBBY.UNRANKED.SLOT", null, DataType.INT, "0"),
LOBBY_UNRANKED_ENABLED("ITEMS.LOBBY.UNRANKED.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_SPECTATE_MENU_NAME("ITEMS.LOBBY.SPECTATE_MENU.NAME", null, DataType.STRING, "&6View Matches &7(Right Click)"),
LOBBY_SPECTATE_MENU_MATERIAL("ITEMS.LOBBY.SPECTATE_MENU.MATERIAL", null, DataType.STRING, "EMERALD"),
LOBBY_SPECTATE_MENU_SLOT("ITEMS.LOBBY.SPECTATE_MENU.SLOT", null, DataType.INT, "1"),
LOBBY_SPECTATE_MENU_ENABLED("ITEMS.LOBBY.SPECTATE_MENU.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_PARTY_CREATE_NAME("ITEMS.LOBBY.PARTY_CREATE.NAME", null, DataType.STRING, "&9Create Party &7(Right Click)"),
LOBBY_PARTY_CREATE_MATERIAL("ITEMS.LOBBY.PARTY_CREATE.MATERIAL", null, DataType.STRING, "NAME_TAG"),
LOBBY_PARTY_CREATE_SLOT("ITEMS.LOBBY.PARTY_CREATE.SLOT", null, DataType.INT, "3"),
LOBBY_PARTY_CREATE_ENABLED("ITEMS.LOBBY.PARTY_CREATE.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_LEADERBOARDS_NAME("ITEMS.LOBBY.LEADERBOARDS.NAME", null, DataType.STRING, "&cLeaderboards &7(Right Click)"),
LOBBY_LEADERBOARDS_MATERIAL("ITEMS.LOBBY.LEADERBOARDS.MATERIAL", null, DataType.STRING, "NETHER_STAR"),
LOBBY_LEADERBOARDS_SLOT("ITEMS.LOBBY.LEADERBOARDS.SLOT", null, DataType.INT, "5"),
LOBBY_LEADERBOARDS_ENABLED("ITEMS.LOBBY.LEADERBOARDS.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_STATS_NAME("ITEMS.LOBBY.STATS.NAME", null, DataType.STRING, "&eStats &7(Right Click)"),
LOBBY_STATS_MATERIAL("ITEMS.LOBBY.STATS.MATERIAL", null, DataType.STRING, "COMPASS"),
LOBBY_STATS_SLOT("ITEMS.LOBBY.STATS.SLOT", null, DataType.INT, "7"),
LOBBY_STATS_ENABLED("ITEMS.LOBBY.STATS.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_KIT_EDITOR_NAME("ITEMS.LOBBY.KIT_EDITOR.NAME", null, DataType.STRING, "&dKit Editor &7(Right Click)"),
LOBBY_KIT_EDITOR_MATERIAL("ITEMS.LOBBY.KIT_EDITOR.MATERIAL", null, DataType.STRING, "BOOK"),
LOBBY_KIT_EDITOR_SLOT("ITEMS.LOBBY.KIT_EDITOR.SLOT", null, DataType.INT, "8"),
LOBBY_KIT_EDITOR_ENABLED("ITEMS.LOBBY.KIT_EDITOR.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_UNRANKED_NAME("ITEMS.IN_LOBBY.UNRANKED.NAME", null, DataType.STRING, "&aQueue Match &7(Right Click)"),
LOBBY_UNRANKED_MATERIAL("ITEMS.IN_LOBBY.UNRANKED.MATERIAL", null, DataType.STRING, "IRON_SWORD"),
LOBBY_UNRANKED_SLOT("ITEMS.IN_LOBBY.UNRANKED.SLOT", null, DataType.INT, "0"),
LOBBY_UNRANKED_ENABLED("ITEMS.IN_LOBBY.UNRANKED.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_SPECTATE_MENU_NAME("ITEMS.IN_LOBBY.SPECTATE_MENU.NAME", null, DataType.STRING, "&6View Matches &7(Right Click)"),
LOBBY_SPECTATE_MENU_MATERIAL("ITEMS.IN_LOBBY.SPECTATE_MENU.MATERIAL", null, DataType.STRING, "EMERALD"),
LOBBY_SPECTATE_MENU_SLOT("ITEMS.IN_LOBBY.SPECTATE_MENU.SLOT", null, DataType.INT, "1"),
LOBBY_SPECTATE_MENU_ENABLED("ITEMS.IN_LOBBY.SPECTATE_MENU.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_PARTY_CREATE_NAME("ITEMS.IN_LOBBY.PARTY_CREATE.NAME", null, DataType.STRING, "&9Create Party &7(Right Click)"),
LOBBY_PARTY_CREATE_MATERIAL("ITEMS.IN_LOBBY.PARTY_CREATE.MATERIAL", null, DataType.STRING, "NAME_TAG"),
LOBBY_PARTY_CREATE_SLOT("ITEMS.IN_LOBBY.PARTY_CREATE.SLOT", null, DataType.INT, "3"),
LOBBY_PARTY_CREATE_ENABLED("ITEMS.IN_LOBBY.PARTY_CREATE.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_LEADERBOARDS_NAME("ITEMS.IN_LOBBY.LEADERBOARDS.NAME", null, DataType.STRING, "&cLeaderboards &7(Right Click)"),
LOBBY_LEADERBOARDS_MATERIAL("ITEMS.IN_LOBBY.LEADERBOARDS.MATERIAL", null, DataType.STRING, "NETHER_STAR"),
LOBBY_LEADERBOARDS_SLOT("ITEMS.IN_LOBBY.LEADERBOARDS.SLOT", null, DataType.INT, "5"),
LOBBY_LEADERBOARDS_ENABLED("ITEMS.IN_LOBBY.LEADERBOARDS.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_STATS_NAME("ITEMS.IN_LOBBY.STATS.NAME", null, DataType.STRING, "&eStats &7(Right Click)"),
LOBBY_STATS_MATERIAL("ITEMS.IN_LOBBY.STATS.MATERIAL", null, DataType.STRING, "COMPASS"),
LOBBY_STATS_SLOT("ITEMS.IN_LOBBY.STATS.SLOT", null, DataType.INT, "7"),
LOBBY_STATS_ENABLED("ITEMS.IN_LOBBY.STATS.ENABLED", null, DataType.BOOLEAN, "true"),
LOBBY_KIT_EDITOR_NAME("ITEMS.IN_LOBBY.KIT_EDITOR.NAME", null, DataType.STRING, "&dKit Editor &7(Right Click)"),
LOBBY_KIT_EDITOR_MATERIAL("ITEMS.IN_LOBBY.KIT_EDITOR.MATERIAL", null, DataType.STRING, "BOOK"),
LOBBY_KIT_EDITOR_SLOT("ITEMS.IN_LOBBY.KIT_EDITOR.SLOT", null, DataType.INT, "8"),
LOBBY_KIT_EDITOR_ENABLED("ITEMS.IN_LOBBY.KIT_EDITOR.ENABLED", null, DataType.BOOLEAN, "true"),
IN_QUEUE_QUEUE_LEAVE_NAME("ITEMS.IN_QUEUE.QUEUE_LEAVE.NAME", null, DataType.STRING, "&cLeave Queue &7(Right Click)"),
IN_QUEUE_QUEUE_LEAVE_MATERIAL("ITEMS.IN_QUEUE.QUEUE_LEAVE.MATERIAL", null, DataType.STRING, "RED_DYE"),
IN_QUEUE_QUEUE_LEAVE_SLOT("ITEMS.IN_QUEUE.QUEUE_LEAVE.SLOT", null, DataType.INT, "8"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dev.lrxh.neptune.utils.ConfigFile;
import lombok.Getter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import dev.lrxh.neptune.utils.ConfigFile;
import dev.lrxh.neptune.utils.PlayerUtil;
import lombok.Getter;
import org.jetbrains.annotations.Nullable;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dev.lrxh.neptune.utils.ConfigFile;
import lombok.Getter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import dev.lrxh.neptune.utils.ConfigFile;
import lombok.Getter;

import javax.annotation.Nullable;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -34,5 +34,4 @@ public enum SettingsLocale implements IDataAccessor {
public ConfigFile getConfigFile() {
return plugin.getConfigManager().getMainConfig();
}

}
}
2 changes: 1 addition & 1 deletion src/main/java/dev/lrxh/neptune/hotbar/impl/ItemAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void execute(Player player) {
QUEUE_LEAVE() {
@Override
public void execute(Player player) {
Neptune.get().getProfileManager().getByUUID(player.getUniqueId()).setState(ProfileState.LOBBY);
Neptune.get().getProfileManager().getByUUID(player.getUniqueId()).setState(ProfileState.IN_LOBBY);
Neptune.get().getQueueManager().remove(player.getUniqueId());
MessagesLocale.QUEUE_LEAVE.send(player.getUniqueId());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/lrxh/neptune/match/Match.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void removeSpectator(UUID playerUUID, boolean sendMessage) {
if (profile.getMatch() == null) return;
PlayerUtil.reset(playerUUID);
PlayerUtil.teleportToSpawn(playerUUID);
profile.setState(ProfileState.LOBBY);
profile.setState(ProfileState.IN_LOBBY);
profile.setMatch(null);

spectators.remove(playerUUID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void onBlockBreakEvent(BlockBreakEvent event) {
if (player.getGameMode().equals(GameMode.CREATIVE)) return;
Profile profile = plugin.getProfileManager().getByUUID(player.getUniqueId());
if (profile == null) return;
if (profile.getState().equals(ProfileState.LOBBY)) {
if (profile.getState().equals(ProfileState.IN_LOBBY)) {
event.setCancelled(true);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void run() {
if (profile.getMatch() == null) continue;
PlayerUtil.reset(participant.getPlayerUUID());
PlayerUtil.teleportToSpawn(participant.getPlayerUUID());
profile.setState(profile.getGameData().getParty() == null ? ProfileState.LOBBY : ProfileState.IN_PARTY);
profile.setState(profile.getGameData().getParty() == null ? ProfileState.IN_LOBBY : ProfileState.IN_PARTY);
profile.setMatch(null);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/lrxh/neptune/party/Party.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ public void remove(UUID playerUUID) {
Profile profile = Neptune.get().getProfileManager().getByUUID(playerUUID);
users.remove(playerUUID);
profile.getGameData().setParty(null);
profile.setState(ProfileState.LOBBY);
profile.setState(ProfileState.IN_LOBBY);
}

public void disband() {
broadcast(MessagesLocale.PARTY_DISBANDED);
for (UUID user : users) {
Profile profile = Neptune.get().getProfileManager().getByUUID(user);
profile.getGameData().setParty(null);
profile.setState(ProfileState.LOBBY);
profile.setState(ProfileState.IN_LOBBY);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void invite(Player player, String otherPlayer) {
@Syntax("<uuid>")
public void accept(Player player, String otherString) {
Profile profile = Neptune.get().getProfileManager().getByUUID(player.getUniqueId());
if (!profile.getState().equals(ProfileState.LOBBY)) return;
if (!profile.getState().equals(ProfileState.IN_LOBBY)) return;
try {
if (profile.getGameData().getParty() != null) {
MessagesLocale.PARTY_ALREADY_IN.send(player.getUniqueId());
Expand Down
10 changes: 7 additions & 3 deletions src/main/java/dev/lrxh/neptune/profile/Profile.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ public class Profile {
private GameData gameData;
private MongoCollection<Document> collection = Neptune.get().getMongoManager().getCollection();

public Profile(UUID playerUUID, ProfileState state) {
public Profile(UUID playerUUID) {
this.playerUUID = playerUUID;
this.state = state;
this.username = Bukkit.getPlayer(playerUUID).getName();
this.state = ProfileState.IN_LOBBY;

Player player = Bukkit.getPlayer(playerUUID);
if(player == null) return;

this.username = player.getName();
this.gameData = new GameData();

for (Kit kit : Neptune.get().getKitManager().kits) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/lrxh/neptune/profile/ProfileManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ProfileManager {
private final Neptune plugin = Neptune.get();

public Profile createProfile(UUID playerUUID) {
Profile profile = new Profile(playerUUID, ProfileState.LOBBY);
Profile profile = new Profile(playerUUID);
profiles.put(playerUUID, profile);
return profile;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/lrxh/neptune/profile/ProfileState.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.lrxh.neptune.profile;

public enum ProfileState {
LOBBY,
IN_LOBBY,
IN_QUEUE,
IN_GAME,
IN_KIT_EDITOR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void handle(UUID playerUUID, UUID otherUUID) {
return;
}

if (has(playerUUID, otherUUID, ProfileState.LOBBY, ProfileState.IN_QUEUE, ProfileState.IN_PARTY)) {
if (has(playerUUID, otherUUID, ProfileState.IN_LOBBY, ProfileState.IN_QUEUE, ProfileState.IN_PARTY)) {
viewerPlayer.showPlayer(plugin, otherPlayer);
otherPlayer.showPlayer(plugin, viewerPlayer);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import dev.lrxh.neptune.profile.Profile;
import dev.lrxh.neptune.profile.ProfileState;
import dev.lrxh.neptune.profile.VisibilityLogic;
import dev.lrxh.neptune.providers.clickable.Replacement;
import dev.lrxh.neptune.utils.PlayerUtil;
import dev.lrxh.neptune.utils.ServerUtils;
import org.bukkit.entity.Player;
Expand All @@ -28,7 +29,7 @@ public void onJoin(PlayerJoinEvent event) {

event.setJoinMessage(null);
if (!MessagesLocale.JOIN_MESSAGE.getString().equals("NONE")) {
ServerUtils.broadcast(MessagesLocale.JOIN_MESSAGE.getString().replace("<player>", player.getName()));
ServerUtils.broadcast(MessagesLocale.JOIN_MESSAGE, new Replacement("<player>", player.getName()));
}
VisibilityLogic.handle(player.getUniqueId());
PlayerUtil.reset(player.getUniqueId());
Expand All @@ -50,7 +51,7 @@ public void onQuit(PlayerQuitEvent event) {

event.setQuitMessage(null);
if (!MessagesLocale.LEAVE_MESSAGE.getString().equals("NONE")) {
ServerUtils.broadcast(MessagesLocale.LEAVE_MESSAGE.getString().replace("<player>", player.getName()));
ServerUtils.broadcast(MessagesLocale.LEAVE_MESSAGE, new Replacement("<player>", player.getName()));
}

plugin.getProfileManager().removeProfile(player.getUniqueId());
Expand All @@ -66,7 +67,7 @@ public void onInventoryClose(InventoryCloseEvent event) {
(Arrays.asList(player.getInventory().getContents()));

MessagesLocale.KIT_EDITOR_STOP.send(player.getUniqueId());
profile.setState(ProfileState.LOBBY);
profile.setState(ProfileState.IN_LOBBY);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public List<String> getLines(Player player) {
Profile profile = plugin.getProfileManager().getByUUID(player.getUniqueId());
if (profile == null) return new ArrayList<>();
ProfileState state = profile.getState();
if (state.equals(ProfileState.LOBBY) || state.equals(ProfileState.IN_KIT_EDITOR)) {
if (state.equals(ProfileState.IN_LOBBY) || state.equals(ProfileState.IN_KIT_EDITOR)) {
return PlaceholderUtil.format(new ArrayList<>(ScoreboardLocale.LOBBY.getStringList()), player);
}
if (state.equals(ProfileState.IN_PARTY)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public void run() {
//If no arenas were found
if (arena == null) {
plugin.getQueueManager().remove(uuid1);
plugin.getProfileManager().getByUUID(uuid1).setState(ProfileState.LOBBY);
plugin.getProfileManager().getByUUID(uuid1).setState(ProfileState.IN_LOBBY);

plugin.getQueueManager().remove(uuid2);
plugin.getProfileManager().getByUUID(uuid2).setState(ProfileState.LOBBY);
plugin.getProfileManager().getByUUID(uuid2).setState(ProfileState.IN_LOBBY);

PlayerUtil.sendMessage(uuid1, CC.error("No arena was found!"));
PlayerUtil.sendMessage(uuid2, CC.error("No arena was found!"));
Expand All @@ -68,10 +68,10 @@ public void run() {
((StandAloneArena) arena).getMin() == null))) {

plugin.getQueueManager().remove(uuid1);
plugin.getProfileManager().getByUUID(uuid1).setState(ProfileState.LOBBY);
plugin.getProfileManager().getByUUID(uuid1).setState(ProfileState.IN_LOBBY);

plugin.getQueueManager().remove(uuid2);
plugin.getProfileManager().getByUUID(uuid2).setState(ProfileState.LOBBY);
plugin.getProfileManager().getByUUID(uuid2).setState(ProfileState.IN_LOBBY);

PlayerUtil.sendMessage(uuid1, CC.error("Arena wasn't setup up properly! Please contact an admin if you see this."));
PlayerUtil.sendMessage(uuid2, CC.error("Arena wasn't setup up properly! Please contact an admin if you see this."));
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/dev/lrxh/neptune/utils/PlayerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.bukkit.potion.PotionEffectType;
import org.bukkit.util.Vector;

import java.util.List;
import java.util.UUID;

@UtilityClass
Expand Down Expand Up @@ -82,7 +83,11 @@ public ItemStack getPlayerHead(UUID playerUUID) {
return utils.getPlayerHead(playerUUID);
}

public void sendMessage(UUID playerUUID, Object... content) {
public void sendMessage(UUID playerUUID, List<Object> content) {
utils.sendMessage(playerUUID, content);
}

public void sendMessage(UUID playerUUID, Object content) {
utils.sendMessage(playerUUID, content);
}

Expand Down
8 changes: 5 additions & 3 deletions src/main/java/dev/lrxh/neptune/utils/ServerUtils.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package dev.lrxh.neptune.utils;

import dev.lrxh.neptune.Neptune;
import dev.lrxh.neptune.configs.impl.MessagesLocale;
import dev.lrxh.neptune.providers.clickable.Replacement;
import lombok.experimental.UtilityClass;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
Expand All @@ -13,12 +15,12 @@ public void sendMessage(String message) {
}

public void error(String message) {
Bukkit.getServer().getConsoleSender().sendMessage(CC.error(message + "!"));
Bukkit.getServer().getConsoleSender().sendMessage(CC.error(message));
}

public void broadcast(String message) {
public void broadcast(MessagesLocale message, Replacement... replacements) {
for (Player player : Neptune.get().getServer().getOnlinePlayers()) {
PlayerUtil.sendMessage(player.getUniqueId(), message);
message.send(player.getUniqueId(), replacements);
}
}
}
Loading

0 comments on commit 3bff8bd

Please sign in to comment.