mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-17 05:31:19 +01:00
Check if item have itemmeta set
This commit is contained in:
parent
2370c8afc2
commit
4318d4bf60
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>Jobs</groupId>
|
<groupId>Jobs</groupId>
|
||||||
<artifactId>jobs</artifactId>
|
<artifactId>jobs</artifactId>
|
||||||
<version>3.9.8</version>
|
<version>4.0.0</version>
|
||||||
<name>Jobs</name>
|
<name>Jobs</name>
|
||||||
<url>http://maven.apache.org</url>
|
<url>http://maven.apache.org</url>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -518,7 +518,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
// If we need to pay only by each craft action we will skip calculation how much was crafted
|
// If we need to pay only by each craft action we will skip calculation how much was crafted
|
||||||
if (!Jobs.getGCManager().PayForEachCraft) {
|
if (!Jobs.getGCManager().PayForEachCraft) {
|
||||||
if (resultStack.getItemMeta().hasDisplayName())
|
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
||||||
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
||||||
else
|
else
|
||||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||||
@ -538,7 +538,7 @@ public class JobsPaymentListener implements Listener {
|
|||||||
int newItemsCount = toCraft.getAmount();
|
int newItemsCount = toCraft.getAmount();
|
||||||
while (newItemsCount >= 0) {
|
while (newItemsCount >= 0) {
|
||||||
newItemsCount--;
|
newItemsCount--;
|
||||||
if (resultStack.getItemMeta().hasDisplayName())
|
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
||||||
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
||||||
else
|
else
|
||||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: Jobs
|
name: Jobs
|
||||||
description: Jobs Plugin for the BukkitAPI
|
description: Jobs Plugin for the BukkitAPI
|
||||||
main: com.gamingmesh.jobs.Jobs
|
main: com.gamingmesh.jobs.Jobs
|
||||||
version: 3.9.8
|
version: 4.0.0
|
||||||
website: https://www.spigotmc.org/resources/jobs-reborn.4216/
|
website: https://www.spigotmc.org/resources/jobs-reborn.4216/
|
||||||
author: phrstbrn
|
author: phrstbrn
|
||||||
softdepend: [Vault, iConomy, MythicMobs, McMMO, WorldGuard, MyPet]
|
softdepend: [Vault, iConomy, MythicMobs, McMMO, WorldGuard, MyPet]
|
||||||
|
Loading…
Reference in New Issue
Block a user