mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 09:06:41 +00:00
it doesnt work
This commit is contained in:
39
src/main/java/dev/plex/util/BuildInfo.java
Normal file
39
src/main/java/dev/plex/util/BuildInfo.java
Normal file
@ -0,0 +1,39 @@
|
||||
package dev.plex.util;
|
||||
|
||||
import dev.plex.Plex;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
import lombok.Getter;
|
||||
|
||||
public class BuildInfo
|
||||
{
|
||||
@Getter
|
||||
public static String number;
|
||||
@Getter
|
||||
public static String author;
|
||||
@Getter
|
||||
public static String date;
|
||||
@Getter
|
||||
public static String head;
|
||||
|
||||
public void load(Plex plugin)
|
||||
{
|
||||
try
|
||||
{
|
||||
Properties props;
|
||||
try (InputStream in = plugin.getResource("build.properties"))
|
||||
{
|
||||
props = new Properties();
|
||||
props.load(in);
|
||||
}
|
||||
|
||||
number = props.getProperty("buildNumber", "unknown");
|
||||
author = props.getProperty("buildAuthor", "unknown");
|
||||
date = props.getProperty("buildDate", "unknown");
|
||||
head = props.getProperty("buildHead", "unknown");
|
||||
}
|
||||
catch (Exception ignored)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user