Skip to content

Commit

Permalink
RELEASE VERSION 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JustBru00 committed Jan 27, 2018
1 parent 6a757d6 commit 4cc6435
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions src/com/gmail/justbru00/epic/rename/utils/v3/Blacklists.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public class Blacklists {
*/
public static boolean checkExistingName(Player p) {
Debug.send("[Blacklists#checkExistingName(Player)] Method called");
if (!p.hasPermission("epicrename.bypass.existingname")) {
// Player doesn't have the bypass permission

String itemName = RenameUtil.getInHand(p).getItemMeta().getDisplayName();
itemName = ChatColor.stripColor(itemName);
Expand All @@ -45,17 +43,19 @@ public static boolean checkExistingName(Player p) {

if (itemName.toLowerCase().contains(blacklistedString.toLowerCase())) {
Debug.send("[Blacklists#checkExistingName(Player)] Name contained '" + blacklistedString + "'");

if (p.hasPermission("epicrename.bypass.existingname")) {
// Player has bypass permission
Debug.send("[Blacklists#checkExistingName(Player)] Player had the epicrename.bypass.existingname permission.");
Messager.msgPlayer(Main.getMsgFromConfig("blacklists.existingname.bypass"), p);
return true;
}

return false;
}
}
}

} else {
Debug.send("[Blacklists#checkExistingName(Player)] Player had the epicrename.bypass.existingname permission.");
Messager.msgPlayer(Main.getMsgFromConfig("blacklists.existingname.bypass"), p);
return true;
}

return true;
}

Expand All @@ -68,8 +68,7 @@ public static boolean checkExistingName(Player p) {
*/
public static boolean checkExistingLore(Player p) {
Debug.send("[Blacklists#checkExistingLore(Player)] Method called");
if (!p.hasPermission("epicrename.bypass.existinglore")) {
// Player doesn't have the bypass permission


List<String> loreLines = RenameUtil.getInHand(p).getItemMeta().getLore();

Expand All @@ -88,17 +87,18 @@ public static boolean checkExistingLore(Player p) {

if (loreLine.toLowerCase().contains(blacklistedString.toLowerCase())) {
Debug.send("[Blacklists#checkExistingLore(Player)] Lore Line: '"+ loreLine + "' contained '" + blacklistedString + "'");
if (p.hasPermission("epicrename.bypass.existinglore")) {
// Player has bypass permission
Debug.send("[Blacklists#checkExistingLore(Player)] Player had the epicrename.bypass.existinglore permission.");
Messager.msgPlayer(Main.getMsgFromConfig("blacklists.existinglore.bypass"), p);
return true;
}

return false;
}
}
}
}

} else {
Debug.send("[Blacklists#checkExistingLore(Player)] Player had the epicrename.bypass.existinglore permission.");
Messager.msgPlayer(Main.getMsgFromConfig("blacklists.existinglore.bypass"), p);
return true;
}
}

return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: EpicRename
main: com.gmail.justbru00.epic.rename.main.v3.Main
version: 3.3-INDEV
version: 3.3
description: Renames items.
author: Justin Brubaker
softdepend: [Vault]
Expand Down

0 comments on commit 4cc6435

Please sign in to comment.