5 Commits
Author SHA1 Message Date
dmg 5017887429 fix: switch to paper async chat event
Build / build (push) Failing after 1m25s
2026-01-27 23:03:40 -05:00
dmg fa2aec3502 Merge pull request 'chore(deps): update dependency gradle to v9' (#4) from renovate/gradle-9.x into main
Build / build (push) Successful in 1m27s
Reviewed-on: #4
2026-01-28 03:58:59 +00:00
dmg 5d0bf94dff Merge branch 'main' into renovate/gradle-9.x 2026-01-28 03:57:37 +00:00
dmg 6952ba6975 Merge branch 'main' into renovate/gradle-9.x 2026-01-28 03:48:48 +00:00
Renovate Bot 58e692833e chore(deps): update dependency gradle to v9 2026-01-23 05:07:57 +00:00
7 changed files with 25 additions and 28 deletions
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -4
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
Vendored
+1 -2
View File
@@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
@@ -3,7 +3,7 @@ package com.prometheus.spigot;
import com.prometheus.spigot.http.MetricsHttpHandler;
import com.prometheus.spigot.listeners.BlockBreakListener;
import com.prometheus.spigot.listeners.BlockPlaceListener;
import com.prometheus.spigot.listeners.ChatListener;
import com.prometheus.spigot.listeners.ChatMessageListener;
import com.prometheus.spigot.listeners.ChunkListener;
import com.prometheus.spigot.listeners.CommandListener;
import com.prometheus.spigot.listeners.ConnectionListener;
@@ -76,7 +76,7 @@ public final class PrometheusSpigotPlugin extends JavaPlugin {
pluginManager.registerEvents(new BlockBreakListener(metricsRegistry), this);
pluginManager.registerEvents(new BlockPlaceListener(metricsRegistry), this);
pluginManager.registerEvents(new DeathListener(metricsRegistry), this);
pluginManager.registerEvents(new ChatListener(metricsRegistry), this);
pluginManager.registerEvents(new ChatMessageListener(metricsRegistry), this);
pluginManager.registerEvents(new MoveListener(metricsRegistry, countBlockMovementOnly), this);
pluginManager.registerEvents(new ConnectionListener(metricsRegistry), this);
pluginManager.registerEvents(new CommandListener(metricsRegistry), this);
@@ -1,19 +0,0 @@
package com.prometheus.spigot.listeners;
import com.prometheus.spigot.metrics.MetricsRegistry;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.AsyncPlayerChatEvent;
public final class ChatListener implements Listener {
private final MetricsRegistry registry;
public ChatListener(MetricsRegistry registry) {
this.registry = registry;
}
@EventHandler
public void onChat(AsyncPlayerChatEvent event) {
registry.incrementChatMessages();
}
}
@@ -0,0 +1,20 @@
package com.prometheus.spigot.listeners;
import com.prometheus.spigot.metrics.MetricsRegistry;
import io.papermc.paper.event.player.AsyncChatEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
public final class ChatMessageListener implements Listener {
private final MetricsRegistry registry;
public ChatMessageListener(MetricsRegistry registry) {
this.registry = registry;
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onChat(AsyncChatEvent event) {
registry.incrementChatMessages();
}
}