mirror of
https://github.com/plexusorg/Plex.git
synced 2024-06-29 08:01:45 +00:00
40 lines
925 B
Java
40 lines
925 B
Java
|
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)
|
||
|
{
|
||
|
}
|
||
|
}
|
||
|
}
|