mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 05:55:27 +01:00
New placeholder to show bonus in percentage from between 0 and 100
%jobsr_user_pboost_[job]_[currency]%
This commit is contained in:
parent
79fbf40ac6
commit
999a1fc224
4
pom.xml
4
pom.xml
@ -5,7 +5,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>Jobs</groupId>
|
||||
<artifactId>jobs</artifactId>
|
||||
<version>5.2.2.1</version>
|
||||
<version>5.2.2.2</version>
|
||||
<name>Jobs</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
@ -288,7 +288,7 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<outputDirectory>build/jar</outputDirectory>
|
||||
<outputDirectory>D:/MC/Server 1.20/plugins</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -71,6 +71,7 @@ public class Placeholder {
|
||||
user_jobs,
|
||||
|
||||
user_boost_$1_$2("jname/number", "money/exp/points"),
|
||||
user_pboost_$1_$2("jname/number", "money/exp/points"),
|
||||
user_isin_$1("jname/number"),
|
||||
user_canjoin_$1("jname/number"),
|
||||
user_jlevel_$1("jname/number"),
|
||||
@ -535,6 +536,9 @@ public class Placeholder {
|
||||
case user_boost_$1_$2:
|
||||
Boost boost = Jobs.getPlayerManager().getFinalBonus(user, job, true, true);
|
||||
return (vals.size() < 2 || j == null) ? "" : simplifyDouble(boost.getFinal(CurrencyType.getByName(vals.get(1)), false, true));
|
||||
case user_pboost_$1_$2:
|
||||
boost = Jobs.getPlayerManager().getFinalBonus(user, job, true, true);
|
||||
return (vals.size() < 2 || j == null) ? "" : simplifyDouble(boost.getFinal(CurrencyType.getByName(vals.get(1)), false, true) * 100D);
|
||||
case user_isin_$1:
|
||||
return job == null ? "no" : convert(user.isInJob(job));
|
||||
case user_job_$1:
|
||||
|
@ -1087,7 +1087,7 @@ public final class JobsPaymentListener implements Listener {
|
||||
if (!Jobs.getGCManager().preventShopItemEnchanting)
|
||||
return;
|
||||
|
||||
if (!Jobs.getPlayerManager().containsItemBoostByNBT(event.getInventory().getContents()[0]))
|
||||
if (!ItemBoostManager.containsItemBoostByNBT(event.getInventory().getContents()[0]))
|
||||
return;
|
||||
|
||||
if (!CMIMaterial.get(event.getInventory().getContents()[1]).equals(CMIMaterial.ENCHANTED_BOOK))
|
||||
|
Loading…
Reference in New Issue
Block a user