mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-26 04:25:16 +01:00
Merge branch 'development'
This commit is contained in:
commit
c319ac3131
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>EpicHeads</artifactId>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>3.2.11</version>
|
||||
<version>3.2.12</version>
|
||||
<build>
|
||||
<defaultGoal>clean install</defaultGoal>
|
||||
<finalName>EpicHeads-${project.version}</finalName>
|
||||
|
@ -238,6 +238,7 @@ public class GUIHeads extends Gui {
|
||||
ChatPrompt.showPrompt(plugin, player, plugin.getLocale().getMessage("general.search.global").getPrefixedMessage(), response -> {
|
||||
List<Head> searchHeads = plugin.getHeadManager().getHeads().stream()
|
||||
.filter(head -> head.getName().toLowerCase().contains(response.getMessage().toLowerCase()))
|
||||
.filter(head -> player.hasPermission("epicheads.category." + head.getCategory().getName().replace(" ", "_")))
|
||||
.collect(Collectors.toList());
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(EpicHeads.getInstance(), ()
|
||||
-> guiManager.showGUI(player, new GUIHeads(plugin, player, response.getMessage(), QueryTypes.SEARCH, searchHeads)), 0L);
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.epicheads.head;
|
||||
|
||||
import com.songoda.core.compatibility.CompatibleMaterial;
|
||||
import com.songoda.core.hooks.EconomyManager;
|
||||
import com.songoda.core.utils.ItemUtils;
|
||||
import com.songoda.epicheads.EpicHeads;
|
||||
import com.songoda.epicheads.settings.Settings;
|
||||
@ -100,9 +101,13 @@ public class Head {
|
||||
lore.add(plugin.getLocale().getMessage("general.head.staffpicked").getMessage());
|
||||
lore.add(plugin.getLocale().getMessage("general.head.id")
|
||||
.processPlaceholder("id", this.id).getMessage());
|
||||
if (!free)
|
||||
if (!free) {
|
||||
String fcost = Settings.ECONOMY_PLUGIN.getString().equalsIgnoreCase("item")
|
||||
? cost + " " + Settings.ITEM_TOKEN_TYPE.getString()
|
||||
: EconomyManager.formatEconomy(cost);
|
||||
lore.add(plugin.getLocale().getMessage("general.head.cost")
|
||||
.processPlaceholder("cost", cost).getMessage());
|
||||
.processPlaceholder("cost", fcost).getMessage());
|
||||
}
|
||||
return lore;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ general:
|
||||
head:
|
||||
staffpicked: '&8Staff Favorite'
|
||||
id: '&8ID: &7%id%'
|
||||
cost: '&8Cost: &7$%cost%'
|
||||
cost: '&8Cost: &7%cost%'
|
||||
gui:
|
||||
heads:
|
||||
refine: '&9Refine Search'
|
||||
|
Loading…
Reference in New Issue
Block a user