Quests - V2.8.2-01 - Removed ColorUtil - By GregZ_

* Incremented dev version in pom.xml.
     * Removed ColorUtil interface, ChatColor is an Enum so that you don't do stuff like this.
     * Updated PlayerListener and Quests classes to reflect the removal of ColorUtil.
     * Improved .gitignore to make sure people don't accidentally push IDE or compiled files in future.
This commit is contained in:
GregZ_ 2017-06-18 14:12:22 +01:00
parent 15ecc4e7af
commit 69cded8065
5 changed files with 394 additions and 403 deletions

25
.gitignore vendored
View File

@ -1,6 +1,27 @@
/target
# Ignore IDEA files
/.idea
*.iml
/bin/
# Eclipse files
/.settings/
*.project
*.classpath
*.recommenders
# NetBeans files
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
# Maven files
/target
# Java files
*.class
*.log
*.ctxt
hs_err_pid*

View File

@ -3,7 +3,7 @@
<groupId>me.blackvein.quests</groupId>
<artifactId>quests</artifactId>
<version>2.8.2</version>
<version>2.8.2-01</version>
<name>quests</name>
<url>https://github.com/FlyingPikachu/Quests/</url>
<packaging>jar</packaging>

View File

@ -1,30 +0,0 @@
package me.blackvein.quests;
import org.bukkit.ChatColor;
public interface ColorUtil {
static final ChatColor BOLD = ChatColor.BOLD;
static final ChatColor ITALIC = ChatColor.ITALIC;
static final ChatColor UNDERLINE = ChatColor.UNDERLINE;
static final ChatColor STRIKETHROUGH = ChatColor.STRIKETHROUGH;
static final ChatColor MAGIC = ChatColor.MAGIC;
static final ChatColor RESET = ChatColor.RESET;
static final ChatColor WHITE = ChatColor.WHITE;
static final ChatColor BLACK = ChatColor.BLACK;
static final ChatColor AQUA = ChatColor.AQUA;
static final ChatColor DARKAQUA = ChatColor.DARK_AQUA;
static final ChatColor BLUE = ChatColor.BLUE;
static final ChatColor DARKBLUE = ChatColor.DARK_BLUE;
static final ChatColor GOLD = ChatColor.GOLD;
static final ChatColor GRAY = ChatColor.GRAY;
static final ChatColor DARKGRAY = ChatColor.DARK_GRAY;
static final ChatColor PINK = ChatColor.LIGHT_PURPLE;
static final ChatColor PURPLE = ChatColor.DARK_PURPLE;
static final ChatColor GREEN = ChatColor.GREEN;
static final ChatColor DARKGREEN = ChatColor.DARK_GREEN;
static final ChatColor RED = ChatColor.RED;
static final ChatColor DARKRED = ChatColor.DARK_RED;
static final ChatColor YELLOW = ChatColor.YELLOW;
}

View File

@ -53,7 +53,7 @@ import org.bukkit.projectiles.ProjectileSource;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
public class PlayerListener implements Listener, ColorUtil {
public class PlayerListener implements Listener {
final Quests plugin;
@ -125,7 +125,7 @@ public class PlayerListener implements Listener, ColorUtil {
String msg = Lang.get("questMaxAllowed");
msg = msg.replaceAll("<number>", String.valueOf(Quests.maxQuests));
player.sendMessage(YELLOW + msg);
player.sendMessage(ChatColor.YELLOW + msg);
} else if (quester.completedQuests.contains(quest.name) && quest.redoDelay < 0) {
String completed = Lang.get("questAlreadyCompleted");
@ -381,7 +381,7 @@ public class PlayerListener implements Listener, ColorUtil {
if (evt.getRightClicked().getType() == EntityType.ITEM_FRAME) {
if(ItemUtil.isJournal(evt.getPlayer().getItemInHand())) {
evt.setCancelled(true);
evt.getPlayer().sendMessage(RED + Lang.get("journalDenied"));
evt.getPlayer().sendMessage(ChatColor.RED + Lang.get("journalDenied"));
}
}
}

File diff suppressed because it is too large Load Diff