mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
Lets simplify it even more
Version increment for future release
This commit is contained in:
parent
edb943be11
commit
d9a48b5b97
@ -449,27 +449,28 @@ public class Placeholder {
|
|||||||
if (values.isEmpty())
|
if (values.isEmpty())
|
||||||
return "";
|
return "";
|
||||||
Job j = getJobFromValue(values.get(0));
|
Job j = getJobFromValue(values.get(0));
|
||||||
|
if (j == null)
|
||||||
|
return "";
|
||||||
// Global placeholders by jobname
|
// Global placeholders by jobname
|
||||||
switch (placeHolder) {
|
switch (placeHolder) {
|
||||||
case name_$1:
|
case name_$1:
|
||||||
return j == null ? "" : j.getName();
|
return j.getName();
|
||||||
case shortname_$1:
|
case shortname_$1:
|
||||||
return j == null ? "" : j.getShortName();
|
return j.getShortName();
|
||||||
case chatcolor_$1:
|
case chatcolor_$1:
|
||||||
return j == null ? "" : j.getChatColor().toString();
|
return j.getChatColor().toString();
|
||||||
case description_$1:
|
case description_$1:
|
||||||
return j == null ? "" : j.getDescription();
|
return j.getDescription();
|
||||||
case maxdailyq_$1:
|
case maxdailyq_$1:
|
||||||
return j == null ? "" : String.valueOf(j.getMaxDailyQuests());
|
return String.valueOf(j.getMaxDailyQuests());
|
||||||
case maxlvl_$1:
|
case maxlvl_$1:
|
||||||
return j == null ? "" : String.valueOf(j.getMaxLevel());
|
return String.valueOf(j.getMaxLevel());
|
||||||
case maxviplvl_$1:
|
case maxviplvl_$1:
|
||||||
return j == null ? "" : String.valueOf(j.getVipMaxLevel());
|
return String.valueOf(j.getVipMaxLevel());
|
||||||
case totalplayers_$1:
|
case totalplayers_$1:
|
||||||
return j == null ? "" : String.valueOf(j.getTotalPlayers());
|
return String.valueOf(j.getTotalPlayers());
|
||||||
case maxslots_$1:
|
case maxslots_$1:
|
||||||
return j == null ? "" : String.valueOf(j.getMaxSlots());
|
return String.valueOf(j.getMaxSlots());
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -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: 4.9.4
|
version: 4.9.5
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
website: https://www.spigotmc.org/resources/4216/
|
website: https://www.spigotmc.org/resources/4216/
|
||||||
author: phrstbrn
|
author: phrstbrn
|
||||||
|
Loading…
Reference in New Issue
Block a user