public class MiscUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
close(AutoCloseable... close) |
static void |
close(Closeable... close) |
static <T> List<T> |
flatMap(Collection<List<T>> coll) |
static IPlan |
getIPlan() |
static List<String> |
getMatchingPlayerNames(String search)
Get matching player names from the offline players.
|
static String |
getPlanVersion() |
static String |
getPlayerName(String[] args,
com.djrapitops.plugin.command.ISender sender)
Get a players name that matches the given arguments or name of the sender.
|
static String |
getPlayerName(String[] args,
com.djrapitops.plugin.command.ISender sender,
Permissions perm)
Used by the inspect command.
|
static long |
getTime()
Used to get the current time as milliseconds.
|
static int |
getTimeZoneOffsetHours() |
public static long getTime()
public static int getTimeZoneOffsetHours()
public static String getPlayerName(String[] args, com.djrapitops.plugin.command.ISender sender)
args
- Arguments of command.sender
- Sender of commandpublic static String getPlayerName(String[] args, com.djrapitops.plugin.command.ISender sender, Permissions perm)
args
- Arguments of a command, must not be empty if console sender.sender
- Command senderperm
- Permission to use when checking. No permission will notify user.public static List<String> getMatchingPlayerNames(String search)
search
- Part of a name to search for.public static <T> List<T> flatMap(Collection<List<T>> coll)
public static void close(Closeable... close)
public static void close(AutoCloseable... close)
public static String getPlanVersion()
public static IPlan getIPlan()
Copyright © 2017. All rights reserved.