mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Fix a few typos and spaces
This commit is contained in:
parent
580cc359e5
commit
05a15ac689
@ -501,12 +501,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
logger.info("[P2] PlaceholderAPI is not in use. Hook deactivated");
|
logger.info("[P2] PlaceholderAPI is not in use. Hook deactivated");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.Enabled_Components.BSTATS) {
|
|
||||||
this.startMetrics();
|
this.startMetrics();
|
||||||
}
|
|
||||||
else {
|
|
||||||
logger.info("[P2] bStats is disabled. Please enable it in /plugins/PlotSquared/config/settings.yml. It helps the developers to identify the features most used and organize future updates better. Cheers.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Settings.Enabled_Components.WORLDS) {
|
if (Settings.Enabled_Components.WORLDS) {
|
||||||
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(1L));
|
TaskManager.getPlatformImplementation().taskRepeat(this::unload, TaskTime.seconds(1L));
|
||||||
@ -980,7 +975,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.metricsStarted = true;
|
this.metricsStarted = true;
|
||||||
Metrics metrics = new Metrics(this, BSTATS_ID);// bstats
|
Metrics metrics = new Metrics(this, BSTATS_ID); // bstats
|
||||||
metrics.addCustomChart(new Metrics.DrilldownPie("area_types", () -> {
|
metrics.addCustomChart(new Metrics.DrilldownPie("area_types", () -> {
|
||||||
final Map<String, Map<String, Integer>> map = new HashMap<>();
|
final Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||||
for (final PlotAreaType plotAreaType : PlotAreaType.values()) {
|
for (final PlotAreaType plotAreaType : PlotAreaType.values()) {
|
||||||
|
@ -72,7 +72,7 @@ public class SchematicCmd extends SubCommand {
|
|||||||
if (args.length < 1) {
|
if (args.length < 1) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
Template.of("value", "Possible values: save, paste , exportall, list")
|
Template.of("value", "Possible values: save, paste, exportall, list")
|
||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ public class SchematicCmd extends SubCommand {
|
|||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
Template.of("value", "Possible values: save, paste , exportall, list")
|
Template.of("value", "Possible values: save, paste, exportall, list")
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -266,7 +266,7 @@ public class SchematicCmd extends SubCommand {
|
|||||||
default:
|
default:
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
Template.of("value", "Possible values: save, paste , exportall, list")
|
Template.of("value", "Possible values: save, paste, exportall, list")
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -186,10 +186,7 @@ public class Settings extends Config {
|
|||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
DEBUG = config.getBoolean("debug", DEBUG);
|
DEBUG = config.getBoolean("debug", DEBUG);
|
||||||
Chat.CONSOLE_COLOR = config.getBoolean("console.color", Chat.CONSOLE_COLOR);
|
|
||||||
Chat.INTERACTIVE = config.getBoolean("chat.fancy", Chat.INTERACTIVE);
|
Chat.INTERACTIVE = config.getBoolean("chat.fancy", Chat.INTERACTIVE);
|
||||||
Enabled_Components.BSTATS =
|
|
||||||
config.getBoolean("bstats", Enabled_Components.BSTATS);
|
|
||||||
|
|
||||||
Enabled_Components.DATABASE_PURGER =
|
Enabled_Components.DATABASE_PURGER =
|
||||||
config.getBoolean("auto-purge", Enabled_Components.DATABASE_PURGER);
|
config.getBoolean("auto-purge", Enabled_Components.DATABASE_PURGER);
|
||||||
@ -284,7 +281,7 @@ public class Settings extends Config {
|
|||||||
INVALID_BLOCKS = Arrays.asList(
|
INVALID_BLOCKS = Arrays.asList(
|
||||||
// Acacia Stuff
|
// Acacia Stuff
|
||||||
"acacia_button", "acacia_fence_gate", "acacia_door", "acacia_pressure_plate",
|
"acacia_button", "acacia_fence_gate", "acacia_door", "acacia_pressure_plate",
|
||||||
"acaia_trapdoor", "acacia_sapling", "acacia_sign", "acacia_wall_sign", "acacia_leaves",
|
"acacia_trapdoor", "acacia_sapling", "acacia_sign", "acacia_wall_sign", "acacia_leaves",
|
||||||
// Birch Stuff
|
// Birch Stuff
|
||||||
"birch_button", "birch_fence_gate", "birch_door", "birch_pressure_plate",
|
"birch_button", "birch_fence_gate", "birch_door", "birch_pressure_plate",
|
||||||
"birch_trapdoor", "birch_sapling", "birch_sign", "birch_wall_sign", "birch_leaves",
|
"birch_trapdoor", "birch_sapling", "birch_sign", "birch_wall_sign", "birch_leaves",
|
||||||
@ -438,8 +435,6 @@ public class Settings extends Config {
|
|||||||
|
|
||||||
@Comment("Chat related settings")
|
@Comment("Chat related settings")
|
||||||
public static final class Chat {
|
public static final class Chat {
|
||||||
@Comment("Sometimes console color doesn't work, you can disable it here")
|
|
||||||
public static boolean CONSOLE_COLOR = true;
|
|
||||||
@Comment("Should the chat be interactive?") public static boolean INTERACTIVE = true;
|
@Comment("Should the chat be interactive?") public static boolean INTERACTIVE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -592,8 +587,6 @@ public class Settings extends Config {
|
|||||||
public static boolean EXTENDED_USERNAME_COMPLETION = true;
|
public static boolean EXTENDED_USERNAME_COMPLETION = true;
|
||||||
@Comment("Command aliases that will be tab completed")
|
@Comment("Command aliases that will be tab completed")
|
||||||
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
public static List<String> TAB_COMPLETED_ALIASES = Arrays.asList("plot", "plots", "p", "plotsquared", "plot2", "p2", "ps", "2", "plotme", "plotz", "ap");
|
||||||
@Comment({"Send anonymous PlotSquared statistics to https://bstats.org/.",
|
|
||||||
"Please keep this setting enabled. It helps us identifying which parts of PlotSquared are used the most to organize future updates better."}) public static boolean BSTATS = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
* _____ _ _ _____ _
|
|
||||||
* | __ \| | | | / ____| | |
|
|
||||||
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
|
|
||||||
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
|
|
||||||
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
|
|
||||||
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
|
|
||||||
* | |
|
|
||||||
* |_|
|
|
||||||
* PlotSquared plot management system for Minecraft
|
|
||||||
* Copyright (C) 2020 IntellectualSites
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
package com.plotsquared.core.util;
|
|
||||||
|
|
||||||
public class ConsoleColors {
|
|
||||||
public static String fromString(String input) {
|
|
||||||
input = input.replaceAll("&0", fromChatColor("&0")).replaceAll("&1", fromChatColor("&1"))
|
|
||||||
.replaceAll("&2", fromChatColor("&2")).replaceAll("&3", fromChatColor("&3"))
|
|
||||||
.replaceAll("&4", fromChatColor("&4")).replaceAll("&5", fromChatColor("&5"))
|
|
||||||
.replaceAll("&6", fromChatColor("&6")).replaceAll("&7", fromChatColor("&7"))
|
|
||||||
.replaceAll("&8", fromChatColor("&8")).replaceAll("&9", fromChatColor("&9"))
|
|
||||||
.replaceAll("&a", fromChatColor("&a")).replaceAll("&b", fromChatColor("&b"))
|
|
||||||
.replaceAll("&c", fromChatColor("&c")).replaceAll("&d", fromChatColor("&d"))
|
|
||||||
.replaceAll("&e", fromChatColor("&e")).replaceAll("&f", fromChatColor("&f"))
|
|
||||||
.replaceAll("&k", fromChatColor("&k")).replaceAll("&l", fromChatColor("&l"))
|
|
||||||
.replaceAll("&m", fromChatColor("&m")).replaceAll("&n", fromChatColor("&n"))
|
|
||||||
.replaceAll("&o", fromChatColor("&o")).replaceAll("&r", fromChatColor("&r"));
|
|
||||||
return input + "\u001B[0m";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* public static final String ANSI_RESET = "\u001B[0m"; public static final
|
|
||||||
* String ANSI_BLACK = "\u001B[30m"; public static final String ANSI_RED =
|
|
||||||
* "\u001B[31m"; public static final String ANSI_GREEN = "\u001B[32m";
|
|
||||||
* public static final String ANSI_YELLOW = "\u001B[33m"; public static
|
|
||||||
* final String ANSI_BLUE = "\u001B[34m"; public static final String
|
|
||||||
* ANSI_PURPLE = "\u001B[35m"; public static final String ANSI_CYAN =
|
|
||||||
* "\u001B[36m"; public static final String ANSI_WHITE = "\u001B[37m";
|
|
||||||
* public static final String ANSI_BOLD = "\033[1m"; public static final
|
|
||||||
* String ANSI_UNDERLINE = "\033[0m"; public static final String ANSI_ITALIC
|
|
||||||
* = "\033[3m]";
|
|
||||||
*/
|
|
||||||
public static String fromChatColor(final String color) {
|
|
||||||
return chatColor(color).getLin();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ConsoleColor chatColor(final String color) {
|
|
||||||
switch (color) {
|
|
||||||
case "&7":
|
|
||||||
case "&8":
|
|
||||||
return ConsoleColor.WHITE;
|
|
||||||
case "&0":
|
|
||||||
return ConsoleColor.BLACK;
|
|
||||||
case "&4":
|
|
||||||
case "&c":
|
|
||||||
return ConsoleColor.RED;
|
|
||||||
case "&6":
|
|
||||||
case "&e":
|
|
||||||
return ConsoleColor.YELLOW;
|
|
||||||
case "&a":
|
|
||||||
case "&2":
|
|
||||||
return ConsoleColor.GREEN;
|
|
||||||
case "&b":
|
|
||||||
case "&3":
|
|
||||||
return ConsoleColor.CYAN;
|
|
||||||
case "&d":
|
|
||||||
case "&5":
|
|
||||||
return ConsoleColor.PURPLE;
|
|
||||||
case "&9":
|
|
||||||
case "&1":
|
|
||||||
return ConsoleColor.BLUE;
|
|
||||||
case "&n":
|
|
||||||
return ConsoleColor.UNDERLINE;
|
|
||||||
case "&o":
|
|
||||||
return ConsoleColor.ITALIC;
|
|
||||||
case "&l":
|
|
||||||
return ConsoleColor.BOLD;
|
|
||||||
case "&r":
|
|
||||||
default:
|
|
||||||
return ConsoleColor.RESET;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ConsoleColor {
|
|
||||||
RESET("\u001B[0m"), BLACK("\u001B[30m"), RED("\u001B[31m"), GREEN("\u001B[32m"), YELLOW(
|
|
||||||
"\u001B[33m"), BLUE("\u001B[34m"), PURPLE("\u001B[35m"), CYAN("\u001B[36m"), WHITE(
|
|
||||||
"\u001B[37m"), BOLD("\033[1m"), UNDERLINE("\033[0m"), ITALIC("\033[3m");
|
|
||||||
private final String lin;
|
|
||||||
|
|
||||||
ConsoleColor(final String lin) {
|
|
||||||
this.lin = lin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getLin() {
|
|
||||||
return lin;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user