Skip to content

Commit

Permalink
refactor: Moved AuthServer events to their own package
Browse files Browse the repository at this point in the history
  • Loading branch information
4drian3d committed Nov 17, 2024
1 parent 0672183 commit 4993149
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 17 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github._4drian3d.authmevelocity.api.velocity.event.authserver;

import org.jetbrains.annotations.NotNull;

/**
* Event to execute when adding an auth server.
*
* @param server the server added
*/
public record AuthServerAddEvent(@NotNull String server) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package io.github._4drian3d.authmevelocity.api.velocity.event.authserver;

import org.jetbrains.annotations.NotNull;

/**
* Event to execute when removing an auth server
*
* @param server the server to remove
*/
public record AuthServerRemoveEvent(@NotNull String server) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Events indicating changes in the AuthMeVelocity internal collection of registered AuthServers.
*/
package io.github._4drian3d.authmevelocity.api.velocity.event.authserver;
9 changes: 5 additions & 4 deletions api/velocity/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/**AuthMeVelocity Velocity API Module */
@SuppressWarnings({"requires-automatic", "requires-transitive-automatic"})
module io.github._4drian3d.authmevelocity.api.velocity {
requires transitive com.velocitypowered.api;
requires static org.jetbrains.annotations;
exports io.github._4drian3d.authmevelocity.api.velocity;
exports io.github._4drian3d.authmevelocity.api.velocity.event;
requires transitive com.velocitypowered.api;
requires static org.jetbrains.annotations;
exports io.github._4drian3d.authmevelocity.api.velocity;
exports io.github._4drian3d.authmevelocity.api.velocity.event;
exports io.github._4drian3d.authmevelocity.api.velocity.event.authserver;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ java {
// create<MavenPublication>("mavenJava") {
// repositories {
// maven {
// credentials(PasswordCredentials::class.java)
// credentials {
// username = property("sonatypeTokenUsername")?.toString() ?: ""
// password = property("sonatypeTokenPassword")?.toString() ?: ""
// }
//
// val central = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
// val snapshots = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group = io.github.4drian3d
version = 4.1.2
version = 4.1.3-SNAPSHOT
description = AuthMeReloaded Support for Velocity
url = https://modrinth.com/plugin/authmevelocity
id = authmevelocity
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import io.github._4drian3d.authmevelocity.api.velocity.AuthMeVelocityAPI;
import io.github._4drian3d.authmevelocity.api.velocity.event.AuthServerAddEvent;
import io.github._4drian3d.authmevelocity.api.velocity.event.AuthServerRemoveEvent;
import io.github._4drian3d.authmevelocity.api.velocity.event.authserver.AuthServerAddEvent;
import io.github._4drian3d.authmevelocity.api.velocity.event.authserver.AuthServerRemoveEvent;
import io.github._4drian3d.authmevelocity.common.Constants;
import io.github._4drian3d.authmevelocity.common.configuration.ConfigurationContainer;
import io.github._4drian3d.authmevelocity.common.configuration.ProxyConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public EventTask executeAsync(final PluginMessageEvent event) {

private boolean notHandledEvent(PluginMessageEvent event) {
if (!event.getResult().isAllowed()) {
plugin.logDebug("PluginMessageEvent | Result not allowed");
plugin.logDebug("PluginMessageEvent | Plugin Message already handled");
return true;
}
final var identifier = event.getIdentifier();
Expand Down

0 comments on commit 4993149

Please sign in to comment.