Skip to content

Commit

Permalink
Remove unnecessary error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Dec 28, 2021
1 parent fb5c3e0 commit 34efbe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,13 @@ private void sendCustomData() {

private void initializeReservationSlots() {
getProxy().getScheduler().schedule(this, () -> {
ServerInfo mainServer = getProxy().getServerInfo(Config.MAINSERVER);
Optional<ServerInfo> mainServer = Optional.ofNullable(getProxy().getServerInfo(Config.MAINSERVER));
if (!mainServer.isPresent())
return;

Map<QueueType, AtomicInteger> map = new EnumMap<>(QueueType.class);

for (ProxiedPlayer player : mainServer.getPlayers()) {
for (ProxiedPlayer player : mainServer.get().getPlayers()) {
QueueType playerType = QueueType.getQueueType(player::hasPermission);

if (map.containsKey(playerType)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private void sendCustomData() {
private void initializeReservationSlots() {
proxyServer.getScheduler().buildTask(this, () -> {
if (!proxyServer.getServer(Config.MAINSERVER).isPresent())
throw new IllegalStateException("Main server not configured properly!!!");
return;

RegisteredServer mainServer = proxyServer.getServer(Config.MAINSERVER).get();
Map<QueueType, AtomicInteger> map = new EnumMap<>(QueueType.class);
Expand Down

0 comments on commit 34efbe0

Please sign in to comment.