Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package some.real.path.utils;
- import java.util.ArrayList;
- import org.bukkit.Bukkit;
- import org.bukkit.command.CommandSender;
- // turt2live - Added temp. JD
- /**
- * You should document what this actually is
- */
- // turt2live - STATIC -> StaticUtilities
- public class StaticUtilties {
- public static Main plugin = null; // turt2live - Rename this class, unless your plugin name is "Main"
- public static boolean isCraftbukkitWorking = true; // turt2live - ?
- public static final String COLOR_ERROR = "§c";
- public static final String COLOR_SERVERLOG = "§6";
- public static final String COLOR_INTERNAL = "§d";
- public static final String COLOR_ADMINCHAT = "§a";
- public static final String COLOR_LUMENCHAT = "§9"; // turt2live - C_... -> COLOR_...
- public static final String HEADER = "§5=============== §6§nLumenTech §5===============";
- public static final String DIVIDER_BAR = "===================================="; // turt2live - DIVIDERBAR -> DIVIDER_BAR
- public static final String PLUGIN_NAME = "LumenTech";
- // turt2live - Fix JD
- /**
- * Prints X amount of spaces.
- * Example: numSpacesToPrint=15, value="10mb" returns "10mb "
- *
- * @param numSpacesToPrint the number of spaces
- * @param value placeholder string
- * @return the new string, with appended spaces
- */
- // turt2live - PRINT_X_SPACES_MINUS_LEFT -> appendSpaces
- public static String appendSpaces(int numSpacesToPrint, String value){
- String ret = "";
- ret += value;
- for(int i = 0; i < numSpacesToPrint - value.length(); i++){
- ret += " ";
- }
- return ret;
- }
- public static final String SUCCESS = "§aSuccess!";
- public static final String FAILURE = "§cFAILURE.";
- /** for telling users a feature is not ready, or has not been added in yet. **/
- public static final String NOT_YET_IMPLEMENTED = "§cThis feature isn't ready yet.";
- public static final String ERROR_P_NOT_FOUND = "§cThat player is not available.";
- public static final String ERROR_FUKKITRAGE = "§cThis might work normally, but because of an update to craftfukkit it is currently broken. You'll have to hunt down a new version of this plugin if you want to use this feature again. Sorry, blame the fukkitdevs. :(";
- public static final String ERROR_DIRECTORY_NOT_FOUND = "Directory not found.";
- public static String TELL_USER_PERMISSION_THEY_LACK(String node){
- return "§cOh teh noes! D: It appears you lack the '" + node + "' permission node that is required to perform this operation.";
- }
- // turt2live - Fix JD
- /**
- * Determines if a CommandSender has a permission node
- *
- * @param cs the command sender
- * @param node the permission node
- * @return true if found applicable
- */
- // turt2live - USER_HAS_PERMISSION -> hasPermission
- public static boolean hasPermission(CommandSender cs, String node){
- // turt2live - What is Fm? Be descriptive in your method names
- return (cs.isOp() && plugin.getFm().isAllowOpOverride()) || cs.hasPermission(node) || cs.hasPermission(PERMISSION_ALL));
- }
- }
- public static final String PERMISSION_DEBUG = "LumenTech.debug";
- public static final String PERMISSION_ALL = "LumenTech.*";
- public static final String PERMISSION_TROLL = "LumenTech.troll";
- public static final String PERMISSION_SLOG = "LumenTech.slog";
- public static final String PERMISSION_PLAYERINFO = "LumenTech.pi";
- public static final String PERMISSION_RATIO = "LumenTech.ratio";
- public static final String PERMISSION_IGNORE_RATIO_BAN = "LumenTech.ignoreratioban";
- public static final String PERMISSION_BACKUP = "LumenTech.backup";
- public static final String PERMISSION_ADMINCHAT = "LumenTech.adminchat";
- public static final String PERMISSION_LUMENCHAT = "LumenTech.lumenchat";
- // turt2live - Added temp. JD
- /**
- * You should document what this actually is
- */
- public static enum SLOG_STATE{
- OFF, COMMANDS_ONLY, ALL;
- };
- // public static enum SLOG_STATE{EVERYTHING,COMMANDS_ONLY,ITEMS,OFF}
- public static String[] CHANGELOG = {
- "- changed name of plugin to LumenTech.",
- "- Added backup system for use with worldedit snapshots.",
- "- added some new command routes. /lt debug is an examaple.",
- "- added /lt perms", "- added /ac and /lc",
- "removed /lc and /ac chat. This will be a part of a more specific \"extension\" plugin known as LumenPlus. "
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment