Updated API to version 3.2
This commit is contained in:
parent
205cdb2d86
commit
1ee4a123d2
@ -10,7 +10,7 @@ import com.redstoner.misc.mysql.MysqlHandler;
|
|||||||
/** Main class. Duh.
|
/** Main class. Duh.
|
||||||
*
|
*
|
||||||
* @author Pepich */
|
* @author Pepich */
|
||||||
@Version(major = 3, minor = 1, revision = 1, compatible = -1)
|
@Version(major = 3, minor = 2, revision = 0, compatible = -1)
|
||||||
public class Main extends JavaPlugin
|
public class Main extends JavaPlugin
|
||||||
{
|
{
|
||||||
public static JavaPlugin plugin;
|
public static JavaPlugin plugin;
|
||||||
|
@ -16,7 +16,7 @@ import net.md_5.bungee.api.ChatColor;
|
|||||||
/** The utils class containing utility functions. Those include but are not limited to sending formatted messages, broadcasts and more.
|
/** The utils class containing utility functions. Those include but are not limited to sending formatted messages, broadcasts and more.
|
||||||
*
|
*
|
||||||
* @author Pepich */
|
* @author Pepich */
|
||||||
@Version(major = 1, minor = 2, revision = 13, compatible = 1)
|
@Version(major = 1, minor = 3, revision = 0, compatible = 1)
|
||||||
public final class Utils
|
public final class Utils
|
||||||
{
|
{
|
||||||
/** The SimpleDateFormat used for getting the current date. */
|
/** The SimpleDateFormat used for getting the current date. */
|
||||||
@ -202,7 +202,7 @@ public final class Utils
|
|||||||
|
|
||||||
/** This method will find the next parent caller and return their class name, omitting package names.
|
/** This method will find the next parent caller and return their class name, omitting package names.
|
||||||
*
|
*
|
||||||
* @return */
|
* @return the Name of the calling class. */
|
||||||
private static final String getCaller()
|
private static final String getCaller()
|
||||||
{
|
{
|
||||||
StackTraceElement[] stackTrace = (new Exception()).getStackTrace();
|
StackTraceElement[] stackTrace = (new Exception()).getStackTrace();
|
||||||
@ -214,6 +214,21 @@ public final class Utils
|
|||||||
return classname;
|
return classname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** This method will find the next parent caller and return their class name, omitting package names.
|
||||||
|
*
|
||||||
|
* @param directCaller used to prevent this method from returning the caller itself. Null if supposed to be ignored.
|
||||||
|
* @return the name of the calling class. */
|
||||||
|
public static final String getCaller(Class<? extends Object> directCaller)
|
||||||
|
{
|
||||||
|
StackTraceElement[] stackTrace = (new Exception()).getStackTrace();
|
||||||
|
String classname = (directCaller == null ? "Utils" : directCaller.getName());
|
||||||
|
for (int i = 0; classname.equals(directCaller.getName()); i++)
|
||||||
|
{
|
||||||
|
classname = stackTrace[i].getClassName().replaceAll(".*\\.", "");
|
||||||
|
}
|
||||||
|
return classname;
|
||||||
|
}
|
||||||
|
|
||||||
/** Displays the module header to the recipient.</br>
|
/** Displays the module header to the recipient.</br>
|
||||||
* Format: &2--=[ %MODULE% ]=--
|
* Format: &2--=[ %MODULE% ]=--
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user