Fixes #2: Remove JANSI dependency for console colours
This commit is contained in:
parent
9e02848e17
commit
a9f1d9e5e7
5
pom.xml
5
pom.xml
@ -53,11 +53,6 @@
|
||||
<version>1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.fusesource.jansi</groupId>
|
||||
<artifactId>jansi</artifactId>
|
||||
<version>1.17.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.onarandombox.multiversecore</groupId>
|
||||
<artifactId>Multiverse-Core</artifactId>
|
||||
|
@ -20,7 +20,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.fusesource.jansi.Ansi;
|
||||
|
||||
/**
|
||||
* A custom logger used to add color to the console when using warnings and
|
||||
@ -30,24 +29,6 @@ import org.fusesource.jansi.Ansi;
|
||||
*/
|
||||
public final class ConsoleLogger extends Logger {
|
||||
|
||||
/**
|
||||
* White color string for console.
|
||||
*/
|
||||
private static final String WHITE_COLOR =
|
||||
Ansi.ansi().fg(Ansi.Color.WHITE).boldOff().toString();
|
||||
|
||||
/**
|
||||
* Yellow color string for console.
|
||||
*/
|
||||
private static final String YELLOW_COLOR =
|
||||
Ansi.ansi().fg(Ansi.Color.YELLOW).bold().toString();
|
||||
|
||||
/**
|
||||
* Red color string for console.
|
||||
*/
|
||||
private static final String RED_COLOR =
|
||||
Ansi.ansi().fg(Ansi.Color.RED).bold().toString();
|
||||
|
||||
/**
|
||||
* The plugin prefix.
|
||||
*/
|
||||
@ -103,18 +84,6 @@ public final class ConsoleLogger extends Logger {
|
||||
@Override
|
||||
public void warning(String message) {
|
||||
|
||||
// If message is a message key.
|
||||
if(translator.isKey(message)) {
|
||||
|
||||
// Translate.
|
||||
message = translator.getTranslation(message);
|
||||
|
||||
}
|
||||
|
||||
// Add color to message.
|
||||
message = ConsoleLogger.YELLOW_COLOR + message +
|
||||
ConsoleLogger.WHITE_COLOR;
|
||||
|
||||
// Log message.
|
||||
this.log(Level.WARNING, message);
|
||||
}
|
||||
@ -122,18 +91,6 @@ public final class ConsoleLogger extends Logger {
|
||||
@Override
|
||||
public void severe(String message) {
|
||||
|
||||
// If message is a message key.
|
||||
if(translator.isKey(message)) {
|
||||
|
||||
// Translate.
|
||||
message = translator.getTranslation(message);
|
||||
|
||||
}
|
||||
|
||||
// Add color to message.
|
||||
message = ConsoleLogger.RED_COLOR + message +
|
||||
ConsoleLogger.WHITE_COLOR;
|
||||
|
||||
// Log message.
|
||||
this.log(Level.SEVERE, message);
|
||||
}
|
||||
@ -146,18 +103,6 @@ public final class ConsoleLogger extends Logger {
|
||||
*/
|
||||
public void severe(String message, Throwable throwable) {
|
||||
|
||||
// If message is a message key.
|
||||
if(translator.isKey(message)) {
|
||||
|
||||
// Translate.
|
||||
message = translator.getTranslation(message);
|
||||
|
||||
}
|
||||
|
||||
// Add color to message.
|
||||
message = ConsoleLogger.RED_COLOR + message +
|
||||
ConsoleLogger.WHITE_COLOR;
|
||||
|
||||
// Log message.
|
||||
this.log(Level.SEVERE, message, throwable);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: ItemCase
|
||||
version: 2.0.0
|
||||
version: 2.0.1
|
||||
description: ItemCase is a Bukkit plugin allowing you to showcase items on slabs, that can also be used as shops.
|
||||
load: POSTWORLD
|
||||
softdepend: [WorldGuard, Vault]
|
||||
@ -19,9 +19,9 @@ permissions:
|
||||
itemcase.create:
|
||||
description: Create and destroy showcase itemcases.
|
||||
itemcase.create.shop.buy:
|
||||
description: Create itemcases that can buy things from players.
|
||||
itemcase.create.shop.sell:
|
||||
description: Create itemcases that can sell things to players.
|
||||
itemcase.create.shop.sell:
|
||||
description: Create itemcases that can buy things from players.
|
||||
itemcase.create.shop.infinite:
|
||||
description: Create an itemcase shop that has infinite items to buy/sell.
|
||||
itemcase.modify.other:
|
||||
|
Loading…
Reference in New Issue
Block a user