mirror of
https://github.com/plexusorg/Plex.git
synced 2026-06-04 05:26:55 +00:00
Debloat the Velocity project
This commit is contained in:
@@ -20,24 +20,48 @@ final class DefaultPlexConfiguration implements PlexConfiguration
|
||||
return config.getString(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String path, String fallback)
|
||||
{
|
||||
return config.getString(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String path)
|
||||
{
|
||||
return config.getBoolean(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String path, boolean fallback)
|
||||
{
|
||||
return config.getBoolean(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String path)
|
||||
{
|
||||
return config.getInt(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String path, int fallback)
|
||||
{
|
||||
return config.getInt(path, fallback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getStringList(String path)
|
||||
{
|
||||
return config.getStringList(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getStringList(String path, List<String> fallback)
|
||||
{
|
||||
return config.contains(path) ? config.getStringList(path) : fallback;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(String path, Object value)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PlexCMD extends ServerCommand
|
||||
if (args.length == 0)
|
||||
{
|
||||
send(sender, mmString("<light_purple>Plex - A new freedom plugin."));
|
||||
send(sender, mmString("<light_purple>Plugin version: <gold>" + plugin.getPluginMeta().getVersion() + " #" + BuildInfo.getNumber() + " <light_purple>Git: <gold>" + BuildInfo.getCommit()));
|
||||
send(sender, mmString("<light_purple>Plugin version: <gold>" + plugin.getPluginMeta().getVersion() + " #" + BuildInfo.getNumber() + " <light_purple>Git: <gold>" + BuildInfo.shortenCommit(BuildInfo.getCommit())));
|
||||
send(sender, mmString("<light_purple>Authors: <gold>Telesphoreo, Taahh"));
|
||||
send(sender, mmString("<light_purple>Built by: <gold>" + BuildInfo.getAuthor() + " <light_purple>on <gold>" + BuildInfo.getDate()));
|
||||
send(sender, mmString("<light_purple>Run <gold>/plex modules <light_purple>to see a list of modules."));
|
||||
|
||||
@@ -41,4 +41,13 @@ public class BuildInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public static String shortenCommit(String commit)
|
||||
{
|
||||
if (commit == null || commit.length() <= 7)
|
||||
{
|
||||
return commit;
|
||||
}
|
||||
return commit.substring(0, 7);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user