mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-16 21:21:20 +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>
|
||||
<groupId>Jobs</groupId>
|
||||
<artifactId>jobs</artifactId>
|
||||
<version>3.9.8</version>
|
||||
<version>4.0.0</version>
|
||||
<name>Jobs</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<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 (!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));
|
||||
else
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||
@ -538,7 +538,7 @@ public class JobsPaymentListener implements Listener {
|
||||
int newItemsCount = toCraft.getAmount();
|
||||
while (newItemsCount >= 0) {
|
||||
newItemsCount--;
|
||||
if (resultStack.getItemMeta().hasDisplayName())
|
||||
if (resultStack.hasItemMeta() && resultStack.getItemMeta().hasDisplayName())
|
||||
Jobs.action(jPlayer, new ItemNameActionInfo(ChatColor.stripColor(resultStack.getItemMeta().getDisplayName()), ActionType.CRAFT));
|
||||
else
|
||||
Jobs.action(jPlayer, new ItemActionInfo(resultStack, ActionType.CRAFT));
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: Jobs
|
||||
description: Jobs Plugin for the BukkitAPI
|
||||
main: com.gamingmesh.jobs.Jobs
|
||||
version: 3.9.8
|
||||
version: 4.0.0
|
||||
website: https://www.spigotmc.org/resources/jobs-reborn.4216/
|
||||
author: phrstbrn
|
||||
softdepend: [Vault, iConomy, MythicMobs, McMMO, WorldGuard, MyPet]
|
||||
|
Loading…
Reference in New Issue
Block a user