Ping
Displays server latency on a nametag or HUD.
Integration
How to toggle the mod
public void togglePingExample(Player viewer, boolean value) {
Optional<ApolloPlayer> apolloPlayerOpt = Apollo.getPlayerManager().getPlayer(viewer.getUniqueId());
apolloPlayerOpt.ifPresent(apolloPlayer -> this.modSettingModule.getOptions().set(apolloPlayer, ModPing.ENABLED, value));
}Available options
-
ENABLED- Config Key:
enabled - Values
- Type:
Boolean - Default:
false
- Type:
- Config Key:
-
UPDATE_INTERVAL_SEC- Faster updates may impact performance
- Config Key:
update-interval-sec - Values
- Type:
Integer - Default:
20 - Minimum:
1 - Maximum:
120
- Type:
-
AVERAGE_SAMPLES- How many updates to average together (one update happens per the 'update interval' setting)
- Config Key:
average-samples - Values
- Type:
Integer - Default:
3 - Minimum:
2 - Maximum:
20
- Type:
-
PING_SPIKE_DETECTION- Config Key:
ping-spike-detection - Values
- Type:
Boolean - Default:
false
- Type:
- Config Key:
-
MEDIUM_SPIKE_THRESHOLD- Config Key:
medium-spike-threshold - Values
- Type:
Integer - Default:
20 - Minimum:
1 - Maximum:
200
- Type:
- Config Key:
-
MEDIUM_SPIKE_COLOR- Config Key:
medium-spike-color - Values
- Type:
String - Default:
#FFFF9100
- Type:
- Config Key:
-
LARGE_SPIKE_THRESHOLD- Config Key:
large-spike-threshold - Values
- Type:
Integer - Default:
50 - Minimum:
1 - Maximum:
200
- Type:
- Config Key:
-
LARGE_SPIKE_COLOR- Config Key:
large-spike-color - Values
- Type:
String - Default:
#FFFF0000
- Type:
- Config Key:
-
PING_SHOW_MS- Config Key:
ping-show-ms - Values
- Type:
Boolean - Default:
true
- Type:
- Config Key:
-
SHOW_PING_PREFIX- Config Key:
show-ping-prefix - Values
- Type:
Boolean - Default:
true
- Type:
- Config Key:
-
PING_PREFIX_COLOR- Config Key:
ping-prefix-color - Values
- Type:
String - Default:
#FFFFFFFF
- Type:
- Config Key:
-
DYNAMIC_PING_COLOR- Config Key:
dynamic-ping-color - Values
- Type:
Boolean - Default:
true
- Type:
- Config Key:
-
PING_NUMBER_COLOR- Config Key:
ping-number-color - Values
- Type:
String - Default:
#FFFFFF55
- Type:
- Config Key:
-
LOW_PING_NUMBER_COLOR- Config Key:
low-ping-number-color - Values
- Type:
String - Default:
#FF55FF55
- Type:
- Config Key:
-
MEDIUM_PING_NUMBER_COLOR- Config Key:
medium-ping-number-color - Values
- Type:
String - Default:
#FFFFFF55
- Type:
- Config Key:
-
HIGH_PING_NUMBER_COLOR- Config Key:
high-ping-number-color - Values
- Type:
String - Default:
#FFFF5555
- Type:
- Config Key:
-
EXTREME_PING_NUMBER_COLOR- Config Key:
extreme-ping-number-color - Values
- Type:
String - Default:
#FFAA0000
- Type:
- Config Key: