From e36190a28beebd05cd0bac2431571d4321c342ef Mon Sep 17 00:00:00 2001 From: skat Date: Mon, 3 May 2021 20:19:56 +0300 Subject: [PATCH] Reduce update intervals, update version --- src/main/java/inside/LightweightHub.java | 10 +++++----- src/main/resources/plugin.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/inside/LightweightHub.java b/src/main/java/inside/LightweightHub.java index f3d3a58..157b86c 100644 --- a/src/main/java/inside/LightweightHub.java +++ b/src/main/java/inside/LightweightHub.java @@ -102,7 +102,7 @@ public void init(){ Events.on(TapEvent.class, event -> teleport(event.player, event.tile)); Events.run(Trigger.update, () -> { - if(interval.get(60 * 0.3f)){ + if(interval.get(60 * 0.15f)){ Groups.player.each(this::teleport); } }); @@ -142,11 +142,11 @@ public void init(){ CompletableFuture[] tasks = config.servers.stream() .map(data -> CompletableFuture.runAsync(() -> { // all tasks executes on ForkJoinPool - Core.app.post(() -> Call.label(data.title, 10f, data.titleX, data.titleY)); + Core.app.post(() -> Call.label(data.title, 5f, data.titleX, data.titleY)); net.pingHost(data.ip, data.port, host -> { counter.addAndGet(host.players); - Call.label(formatter.get(host), 10f, data.labelX, data.labelY); - }, e -> Call.label(config.offlinePattern, 10f, data.labelX, data.labelY)); + Call.label(formatter.get(host), 5f, data.labelX, data.labelY); + }, e -> Call.label(config.offlinePattern, 5f, data.labelX, data.labelY)); })) .toArray(CompletableFuture[]::new); @@ -155,7 +155,7 @@ public void init(){ Core.settings.put("totalPlayers", counter.get()); counter.set(0); }).join(); - }, 1.5f, 10f); + }, 1.5f, 5f); } @Override diff --git a/src/main/resources/plugin.json b/src/main/resources/plugin.json index 010d894..8e5b346 100644 --- a/src/main/resources/plugin.json +++ b/src/main/resources/plugin.json @@ -3,5 +3,5 @@ "author": "Mindustry Inside", "main": "inside.LightweightHub", "description": "A lightweight hub plugin for servers.", - "version": "0.6" + "version": "0.7" }