JavaDocs can be generated with mvn javadoc:javadoc and will be available in target/site/apidocs.
This commit is contained in:
parent
70570624e1
commit
aa223df480
9
pom.xml
9
pom.xml
@ -33,7 +33,8 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins><plugin>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
@ -56,6 +57,12 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -30,7 +30,11 @@ public class Logger
|
||||
className = logClass.getSimpleName();
|
||||
}
|
||||
|
||||
// log a message to console, with our chosen format
|
||||
/**
|
||||
* Logs a message to console, following a specific format.
|
||||
*
|
||||
* @param message the message to log
|
||||
*/
|
||||
public void log(String message)
|
||||
{
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
@ -43,7 +47,12 @@ public class Logger
|
||||
.replace("%message%", message));
|
||||
}
|
||||
|
||||
// log a message to console after delaying it (in seconds).
|
||||
/**
|
||||
* Logs a message to console, after delaying it.
|
||||
*
|
||||
* @param message the message to log
|
||||
* @param delay the time to wait before logging, in seconds
|
||||
*/
|
||||
public void log(String message, int delay)
|
||||
{
|
||||
// create a new scheduled executor with an anonymous runnable...
|
||||
@ -52,12 +61,21 @@ public class Logger
|
||||
|
||||
}
|
||||
|
||||
// avoid formatting the text and print whatever is passed.
|
||||
/**
|
||||
* Prints a message to console without any formatting.
|
||||
*
|
||||
* @param message the message to log
|
||||
*/
|
||||
public void logRaw(String message)
|
||||
{
|
||||
System.out.println(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ASCII art saying the bot name.
|
||||
*
|
||||
* @return a String containing the logo
|
||||
*/
|
||||
public String getLogo()
|
||||
{
|
||||
return logo;
|
||||
|
@ -6,6 +6,14 @@ public class RandomUtil
|
||||
{
|
||||
private static final Random random = new Random();
|
||||
|
||||
|
||||
/**
|
||||
* Returns a random integer picked in a range.
|
||||
*
|
||||
* @param min the minimum value (inclusive)
|
||||
* @param max the maximum value (inclusive)
|
||||
* @return a random number in range [min; max]
|
||||
*/
|
||||
public static int getRandomNumber(int min, int max)
|
||||
{
|
||||
if(min == max) return min; // dumbass
|
||||
|
Loading…
Reference in New Issue
Block a user