mirror of
https://github.com/songoda/EpicVouchers.git
synced 2024-11-22 01:56:21 +01:00
Fixed vouchers not working with a white name
This commit is contained in:
parent
e5b519fd7d
commit
5b080fb669
@ -3,6 +3,8 @@ package com.songoda.epicvouchers.listeners;
|
||||
import com.songoda.epicvouchers.EpicVouchers;
|
||||
import com.songoda.epicvouchers.menus.ConfirmMenu;
|
||||
import com.songoda.epicvouchers.voucher.Voucher;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -39,7 +41,9 @@ public class PlayerInteractListener implements Listener {
|
||||
else {
|
||||
// material matches - verify the name + lore
|
||||
final ItemMeta meta = item.getItemMeta();
|
||||
if (meta == null || !meta.hasDisplayName() || !meta.hasLore() || !meta.getDisplayName().equals(voucher.getName(true)) || !meta.getLore().equals(voucher.getLore(true)))
|
||||
if (meta == null || !meta.hasDisplayName() || !meta.hasLore()
|
||||
|| !ChatColor.stripColor(meta.getDisplayName()).equals(ChatColor.stripColor(voucher.getName(true)))
|
||||
|| !meta.getLore().equals(voucher.getLore(true)))
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user