Fill all plugin metadata properly.

This commit is contained in:
juanmuscaria
2021-09-14 12:12:04 -03:00
parent de0655cba2
commit 502b16a0e7
3 changed files with 25 additions and 3 deletions

View File

@ -45,6 +45,19 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>filter-src</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>

View File

@ -0,0 +1,9 @@
package com.github.games647.fastlogin.velocity;
public class PomData {
public static final String DISPLAY_NAME = "${project.name}";
public static final String NAME = "${project.parent.artifactId}";
public static final String VERSION = "${project.version}-${git.commit.id.abbrev}";
public static final String DESCRIPTION = "${project.parent.description}";
public static final String URL = "${project.parent.url}";
}

View File

@ -61,7 +61,8 @@ import com.velocitypowered.api.proxy.server.RegisteredServer;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.slf4j.Logger;
@Plugin(id = "fastlogin")
@Plugin(id = PomData.NAME, name = PomData.DISPLAY_NAME, description = PomData.DESCRIPTION, url = PomData.URL,
version = PomData.VERSION, authors = {"games647", "https://github.com/games647/FastLogin/graphs/contributors"})
public class FastLoginVelocity implements PlatformPlugin<CommandSource> {
private final ProxyServer server;
private final Path dataDirectory;
@ -96,8 +97,7 @@ public class FastLoginVelocity implements PlatformPlugin<CommandSource> {
@Override
public String getName() {
//FIXME: some dynamic way to get it?
return "fastlogin";
return PomData.NAME;
}
@Override