mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Added more detailed build information to /tfm through appinfo.properties
This commit is contained in:
parent
0e9044ffc3
commit
7df24c6b86
3
.gitignore
vendored
3
.gitignore
vendored
@ -17,3 +17,6 @@ manifest.mf
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# TFM files
|
||||
buildcreator.properties
|
@ -2,11 +2,17 @@
|
||||
<project name="TotalFreedomMod" default="default" basedir=".">
|
||||
<description>Builds, tests, and runs the project TotalFreedomMod.</description>
|
||||
<import file="nbproject/build-impl.xml" />
|
||||
|
||||
<target name="-pre-jar">
|
||||
<copy file="buildcreator.default.properties" tofile="buildcreator.properties" overwrite="false" />
|
||||
|
||||
<property file="buildcreator.properties"/>
|
||||
<buildnumber file="buildnumber.properties" />
|
||||
|
||||
<propertyfile file="appinfo.properties">
|
||||
<entry key="program.buildnumber" value="${build.number}" />
|
||||
<entry key="program.builddate" type="date" value="now" pattern="MM/dd/yyyy hh:mm aa" />
|
||||
<entry key="program.buildcreator" value="${program.buildcreator}" />
|
||||
</propertyfile>
|
||||
<copy file="appinfo.properties" todir="${build.classes.dir}" />
|
||||
<delete file="appinfo.properties" />
|
||||
|
2
buildcreator.default.properties
Normal file
2
buildcreator.default.properties
Normal file
@ -0,0 +1,2 @@
|
||||
# Build creator configuration
|
||||
program.buildcreator=Unknown
|
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Thu Apr 17 18:28:38 CEST 2014
|
||||
build.number=765
|
||||
#Mon Apr 21 14:37:04 CEST 2014
|
||||
build.number=777
|
||||
|
@ -13,8 +13,15 @@ public class Command_tfm extends TFM_Command
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
playerMsg("TotalFreedomMod for 'TotalFreedom', the original all-op server.", ChatColor.GOLD);
|
||||
playerMsg(String.format("Version " + ChatColor.BLUE + "%s.%s" + ChatColor.BLUE + ", built %s.", TotalFreedomMod.pluginVersion, TotalFreedomMod.buildNumber, TotalFreedomMod.buildDate), ChatColor.GOLD);
|
||||
playerMsg(TotalFreedomMod.pluginName + " for 'Total Freedom', the original all-op server.", ChatColor.GOLD);
|
||||
playerMsg(String.format("Version "
|
||||
+ ChatColor.BLUE + "%s.%s" + ChatColor.GOLD + ", built "
|
||||
+ ChatColor.BLUE + "%s" + ChatColor.GOLD + " by "
|
||||
+ ChatColor.BLUE + "%s" + ChatColor.GOLD + ".",
|
||||
TotalFreedomMod.pluginVersion,
|
||||
TotalFreedomMod.buildNumber,
|
||||
TotalFreedomMod.buildDate,
|
||||
TotalFreedomMod.buildCreator), ChatColor.GOLD);
|
||||
playerMsg("Created by Madgeek1450 and DarthSalamon.", ChatColor.GOLD);
|
||||
playerMsg("Visit " + ChatColor.AQUA + "http://totalfreedom.me/" + ChatColor.GREEN + " for more information.", ChatColor.GREEN);
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package me.StevenLawson.TotalFreedomMod;
|
||||
|
||||
import java.io.IOException;
|
||||
import me.StevenLawson.TotalFreedomMod.Config.TFM_ConfigEntry;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
|
@ -51,13 +51,14 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
public static final String CAKE_LYRICS = "But there's no sense crying over every mistake. You just keep on trying till you run out of cake.";
|
||||
public static final String NOT_FROM_CONSOLE = "This command may not be used from the console.";
|
||||
//
|
||||
public static Server server = null;
|
||||
public static TotalFreedomMod plugin = null;
|
||||
public static String buildNumber = "1";
|
||||
public static String buildDate = TotalFreedomMod.buildDate = TFM_Util.dateToString(new Date());
|
||||
public static String buildCreator = "Unknown";
|
||||
//
|
||||
public static String pluginName = "";
|
||||
public static String pluginVersion = "";
|
||||
public static String buildNumber = "";
|
||||
public static String buildDate = "";
|
||||
public static Server server;
|
||||
public static TotalFreedomMod plugin;
|
||||
public static String pluginName;
|
||||
public static String pluginVersion;
|
||||
//
|
||||
public static boolean allPlayersFrozen = false;
|
||||
public static BukkitTask freezePurgeTask = null;
|
||||
@ -85,7 +86,8 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
TFM_Log.info("Version: " + TotalFreedomMod.pluginVersion + "." + TotalFreedomMod.buildNumber + " by Madgeek1450 and DarthSalamon");
|
||||
TFM_Log.info("Starting " + pluginName + " v" + TotalFreedomMod.pluginVersion + "." + TotalFreedomMod.buildNumber);
|
||||
TFM_Log.info("Made by Madgeek1450 and DarthSalamon, Compiled " + buildDate + " by " + buildCreator);
|
||||
|
||||
loadSuperadminConfig();
|
||||
loadPermbanConfig();
|
||||
@ -325,7 +327,7 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
{
|
||||
try
|
||||
{
|
||||
InputStream in = plugin.getResource("appinfo.properties");
|
||||
final InputStream in = plugin.getResource("appinfo.properties");
|
||||
Properties props = new Properties();
|
||||
|
||||
// in = plugin.getClass().getResourceAsStream("/appinfo.properties");
|
||||
@ -334,14 +336,12 @@ public class TotalFreedomMod extends JavaPlugin
|
||||
|
||||
TotalFreedomMod.buildNumber = props.getProperty("program.buildnumber");
|
||||
TotalFreedomMod.buildDate = props.getProperty("program.builddate");
|
||||
TotalFreedomMod.buildCreator = props.getProperty("program.buildcreator");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TFM_Log.severe("Could not load App properties!");
|
||||
TFM_Log.severe(ex);
|
||||
|
||||
TotalFreedomMod.buildNumber = "1";
|
||||
TotalFreedomMod.buildDate = TFM_Util.dateToString(new Date());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user