mirror of
https://github.com/Zrips/Jobs.git
synced 2025-01-08 01:08:23 +01:00
Added editable message for /jobs browse on console
- Fix last commit changes not works, so it changed to basic (no edit more) - Added SEEDS to use all seeds - Fixed the player get money even when the plant was not ripe (again)
This commit is contained in:
parent
8601b24ed0
commit
5e64f83605
@ -644,7 +644,7 @@ public class ItemManager {
|
|||||||
BEEF(363, 0, 4803, "Raw Beef", ""),
|
BEEF(363, 0, 4803, "Raw Beef", ""),
|
||||||
BEETROOT(434, 0, 23305, "Beetroot", ""),
|
BEETROOT(434, 0, 23305, "Beetroot", ""),
|
||||||
BEETROOTS(207, 0, 22075, "Beetroots", "BEETROOT_BLOCK"),
|
BEETROOTS(207, 0, 22075, "Beetroots", "BEETROOT_BLOCK"),
|
||||||
BEETROOT_SEEDS(435, 0, 21282, "Beetroot Seeds", ""),
|
BEETROOT_SEEDS(435, 0, 21282, "Beetroot Seeds", "SEEDS"),
|
||||||
BEETROOT_SOUP(436, 0, 16036, "Beetroot Soup", ""),
|
BEETROOT_SOUP(436, 0, 16036, "Beetroot Soup", ""),
|
||||||
BIRCH_BOAT(445, 0, 28104, "Birch Boat", "BOAT_BIRCH"),
|
BIRCH_BOAT(445, 0, 28104, "Birch Boat", "BOAT_BIRCH"),
|
||||||
BIRCH_BUTTON(-1, -1, 26934, "Birch Button", ""),
|
BIRCH_BUTTON(-1, -1, 26934, "Birch Button", ""),
|
||||||
@ -1106,7 +1106,7 @@ public class ItemManager {
|
|||||||
MAGMA_CUBE_SPAWN_EGG(383, 62, 26638, "Spawn Magma Cube", "Magma Cube Spawn Egg"),
|
MAGMA_CUBE_SPAWN_EGG(383, 62, 26638, "Spawn Magma Cube", "Magma Cube Spawn Egg"),
|
||||||
MAP(395, 0, 21655, "Empty Map", "EMPTY_MAP"),
|
MAP(395, 0, 21655, "Empty Map", "EMPTY_MAP"),
|
||||||
MELON(103, 0, 25172, "Melon", "Melon_Block"),
|
MELON(103, 0, 25172, "Melon", "Melon_Block"),
|
||||||
MELON_SEEDS(362, 0, 18340, "Melon Seeds", ""),
|
MELON_SEEDS(362, 0, 18340, "Melon Seeds", "SEEDS"),
|
||||||
MELON_SLICE(360, 0, 5347, "Melon Slice", ""),
|
MELON_SLICE(360, 0, 5347, "Melon Slice", ""),
|
||||||
MELON_STEM(105, 0, 8247, "Melon Stem", ""),
|
MELON_STEM(105, 0, 8247, "Melon Stem", ""),
|
||||||
MILK_BUCKET(335, 0, 9680, "Milk Bucket", ""),
|
MILK_BUCKET(335, 0, 9680, "Milk Bucket", ""),
|
||||||
@ -1293,7 +1293,7 @@ public class ItemManager {
|
|||||||
PUFFERFISH_SPAWN_EGG(-1, -1, 24573, "Pufferfish Spawn Egg", ""),
|
PUFFERFISH_SPAWN_EGG(-1, -1, 24573, "Pufferfish Spawn Egg", ""),
|
||||||
PUMPKIN(86, 0, 19170, "Pumpkin", "PUMPKIN"),
|
PUMPKIN(86, 0, 19170, "Pumpkin", "PUMPKIN"),
|
||||||
PUMPKIN_PIE(400, 0, 28725, "Pumpkin Pie", ""),
|
PUMPKIN_PIE(400, 0, 28725, "Pumpkin Pie", ""),
|
||||||
PUMPKIN_SEEDS(361, 0, 28985, "Pumpkin Seeds", ""),
|
PUMPKIN_SEEDS(361, 0, 28985, "Pumpkin Seeds", "SEEDS"),
|
||||||
PUMPKIN_STEM(104, 0, 19021, "Pumpkin Stem", ""),
|
PUMPKIN_STEM(104, 0, 19021, "Pumpkin Stem", ""),
|
||||||
PURPLE_BANNER(425, 5, 29027, "Purple Banner", ""),
|
PURPLE_BANNER(425, 5, 29027, "Purple Banner", ""),
|
||||||
PURPLE_BED(355, 10, 29755, "Purple Bed", "Purple Bed"),
|
PURPLE_BED(355, 10, 29755, "Purple Bed", "Purple Bed"),
|
||||||
|
@ -83,7 +83,7 @@ public class browse implements Cmd {
|
|||||||
String hoverMsg = "";
|
String hoverMsg = "";
|
||||||
|
|
||||||
if (!one.getDescription().isEmpty())
|
if (!one.getDescription().isEmpty())
|
||||||
hoverMsg += one.getDescription().replace("/n", "");
|
hoverMsg += Jobs.getLanguage().getMessage("command.browse.output.description", "[description]", one.getDescription().replace("/n", ""));
|
||||||
|
|
||||||
if (one.getMaxLevel(sender) > 0) {
|
if (one.getMaxLevel(sender) > 0) {
|
||||||
if (!hoverMsg.isEmpty())
|
if (!hoverMsg.isEmpty())
|
||||||
@ -136,7 +136,7 @@ public class browse implements Cmd {
|
|||||||
|
|
||||||
if (!j.getFullDescription().isEmpty()) {
|
if (!j.getFullDescription().isEmpty()) {
|
||||||
for (String one : j.getFullDescription()) {
|
for (String one : j.getFullDescription()) {
|
||||||
sender.sendMessage(one);
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.description", "[description]", one));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,39 +153,28 @@ public class browse implements Cmd {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (j == null) {
|
if (j == null) {
|
||||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.newHeader", "[amount]", jobList.size()));
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.console.newHeader", "[amount]", jobList.size(), "\\n", "\n"));
|
||||||
for (Job one : jobList) {
|
for (Job one : jobList) {
|
||||||
|
|
||||||
String msg = "";
|
String msg = "";
|
||||||
|
|
||||||
if (!one.getDescription().isEmpty())
|
if (!one.getDescription().isEmpty())
|
||||||
msg += one.getDescription().replace("/n", "");
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.description", "[description]", one.getDescription().replace("/n", ""));
|
||||||
|
|
||||||
if (one.getMaxLevel(sender) > 0) {
|
if (one.getMaxLevel(sender) > 0)
|
||||||
if (!msg.isEmpty())
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.newMax", "[max]", one.getMaxLevel(sender));
|
||||||
msg += " \n";
|
|
||||||
msg += Jobs.getLanguage().getMessage("command.info.help.newMax", "[max]", one.getMaxLevel(sender));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Jobs.getGCManager().ShowTotalWorkers) {
|
if (Jobs.getGCManager().ShowTotalWorkers)
|
||||||
if (!msg.isEmpty())
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.totalWorkers", "[amount]", one.getTotalPlayers());
|
||||||
msg += " \n";
|
|
||||||
msg += Jobs.getLanguage().getMessage("command.browse.output.totalWorkers", "[amount]", one.getTotalPlayers());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Jobs.getGCManager().useDynamicPayment && Jobs.getGCManager().ShowPenaltyBonus) {
|
if (Jobs.getGCManager().useDynamicPayment && Jobs.getGCManager().ShowPenaltyBonus) {
|
||||||
if (!msg.isEmpty())
|
|
||||||
msg += " \n";
|
|
||||||
if ((int) (one.getBonus() * 100) < 0)
|
if ((int) (one.getBonus() * 100) < 0)
|
||||||
msg += Jobs.getLanguage().getMessage("command.browse.output.penalty", "[amount]", (int) (one.getBonus() * 100) * -1);
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.penalty", "[amount]", (int) (one.getBonus() * 100) * -1);
|
||||||
else
|
else
|
||||||
msg += Jobs.getLanguage().getMessage("command.browse.output.bonus", "[amount]", (int) (one.getBonus() * 100));
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.bonus", "[amount]", (int) (one.getBonus() * 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!msg.isEmpty())
|
msg += Jobs.getLanguage().getMessage("command.browse.output.console.list", "[jobname]", one.getName());
|
||||||
msg += " \n";
|
|
||||||
msg += Jobs.getLanguage().getMessage("command.browse.output.consoleList", "[jobname]", one.getName());
|
|
||||||
|
|
||||||
sender.sendMessage(msg);
|
sender.sendMessage(msg);
|
||||||
}
|
}
|
||||||
@ -208,7 +197,7 @@ public class browse implements Cmd {
|
|||||||
|
|
||||||
if (!j.getFullDescription().isEmpty()) {
|
if (!j.getFullDescription().isEmpty()) {
|
||||||
for (String one : j.getFullDescription()) {
|
for (String one : j.getFullDescription()) {
|
||||||
sender.sendMessage(one);
|
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.description", "[description]", one));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,19 +425,19 @@ public class ConfigManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int maxLevel = jobSection.getInt("max-level", 0);
|
int maxLevel = jobSection.getInt("max-level", 0);
|
||||||
if (jobSection.isInt("max-level") || maxLevel < 0)
|
if (maxLevel < 0)
|
||||||
maxLevel = 0;
|
maxLevel = 0;
|
||||||
|
|
||||||
int vipmaxLevel = jobSection.getInt("vip-max-level", 0);
|
int vipmaxLevel = jobSection.getInt("vip-max-level", 0);
|
||||||
if (jobSection.isInt("vip-max-level") || vipmaxLevel < 0)
|
if (vipmaxLevel < 0)
|
||||||
vipmaxLevel = 0;
|
vipmaxLevel = 0;
|
||||||
|
|
||||||
Integer maxSlots = jobSection.getInt("slots", 0);
|
Integer maxSlots = jobSection.getInt("slots", 0);
|
||||||
if (jobSection.isInt("slots") || maxSlots.intValue() <= 0)
|
if (maxSlots.intValue() <= 0)
|
||||||
maxSlots = null;
|
maxSlots = null;
|
||||||
|
|
||||||
Long rejoinCd = jobSection.getLong("rejoinCooldown", 0L);
|
Long rejoinCd = jobSection.getLong("rejoinCooldown", 0L);
|
||||||
if (jobSection.isLong("rejoinCooldown") || rejoinCd < 0L)
|
if (rejoinCd < 0L)
|
||||||
rejoinCd = 0L;
|
rejoinCd = 0L;
|
||||||
rejoinCd = rejoinCd * 1000L;
|
rejoinCd = rejoinCd * 1000L;
|
||||||
|
|
||||||
|
@ -431,8 +431,17 @@ public class LanguageManager {
|
|||||||
c.get("command.browse.output.bonus", " &2Bonus: &a[amount]%");
|
c.get("command.browse.output.bonus", " &2Bonus: &a[amount]%");
|
||||||
|
|
||||||
c.get("command.browse.output.newHeader", "&2========== [amount] Available Jobs =========");
|
c.get("command.browse.output.newHeader", "&2========== [amount] Available Jobs =========");
|
||||||
|
c.get("command.browse.output.description", "[description]");
|
||||||
c.get("command.browse.output.list", " &8[place]. &7[jobname]");
|
c.get("command.browse.output.list", " &8[place]. &7[jobname]");
|
||||||
c.get("command.browse.output.consoleList", " &6[jobname]");
|
|
||||||
|
c.get("command.browse.output.console.newHeader", "&2========== [amount] Available Jobs =========");
|
||||||
|
c.get("command.browse.output.console.description", "[description]");
|
||||||
|
c.get("command.browse.output.console.totalWorkers", " &7Workers: &e[amount]");
|
||||||
|
c.get("command.browse.output.console.penalty", " &4Penalty: &c[amount]%");
|
||||||
|
c.get("command.browse.output.console.bonus", " &2Bonus: &a[amount]%");
|
||||||
|
c.get("command.browse.output.console.list", " &6[jobname]");
|
||||||
|
c.get("command.browse.output.console.newMax", " &eMax level: &f[max]");
|
||||||
|
|
||||||
c.get("command.browse.output.click", "&bClick on the job to see more info about it!");
|
c.get("command.browse.output.click", "&bClick on the job to see more info about it!");
|
||||||
c.get("command.browse.output.detailed", "&bClick to see more detailed list on job actions");
|
c.get("command.browse.output.detailed", "&bClick to see more detailed list on job actions");
|
||||||
|
|
||||||
|
@ -378,16 +378,15 @@ public class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
BlockActionInfo bInfo = new BlockActionInfo(block, ActionType.BREAK);
|
||||||
// Checks whether or not the plant is ripe if it does not get money at that time
|
// Checks whether or not the plant is ripe if it does not get money at that time
|
||||||
if (block.getType().equals(CMIMaterial.BEETROOT_SEEDS) || block.getType().equals(CMIMaterial.MELON_SEEDS) ||
|
if (block.getType().equals(CMIMaterial.WHEAT_SEEDS) || block.getType().equals(CMIMaterial.BEETROOT_SEEDS) ||
|
||||||
block.getType().equals(CMIMaterial.WHEAT_SEEDS) || block.getType().equals(CMIMaterial.PUMPKIN_SEEDS) ||
|
block.getType().equals(CMIMaterial.MELON_SEEDS) || block.getType().equals(CMIMaterial.WHEAT_SEEDS) ||
|
||||||
block.getType().equals(CMIMaterial.CARROT) || block.getType().equals(CMIMaterial.COCOA_BEANS) ||
|
block.getType().equals(CMIMaterial.PUMPKIN_SEEDS) || block.getType().equals(CMIMaterial.CARROT) ||
|
||||||
block.getType().equals(CMIMaterial.POTATO) || block.getType().equals(CMIMaterial.NETHER_WART)) {
|
block.getType().equals(CMIMaterial.COCOA_BEANS) || block.getType().equals(CMIMaterial.POTATO) ||
|
||||||
|
block.getType().equals(CMIMaterial.NETHER_WART) || block.getType().equals(CMIMaterial.WHEAT)) {
|
||||||
Crops crop = (Crops) block.getState();
|
Crops crop = (Crops) block.getState();
|
||||||
if (crop.getState().equals(CropState.RIPE)) {
|
if (crop.getState() == CropState.RIPE) {
|
||||||
// continue to get money
|
// continue to get money
|
||||||
} else if (crop.getState().equals(CropState.SEEDED) || crop.getState().equals(CropState.MEDIUM) ||
|
} else
|
||||||
crop.getState().equals(CropState.SMALL) || crop.getState().equals(CropState.TALL) ||
|
|
||||||
crop.getState().equals(CropState.VERY_SMALL) || crop.getState().equals(CropState.VERY_TALL))
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FastPayment fp = Jobs.FastPayment.get(player.getName());
|
FastPayment fp = Jobs.FastPayment.get(player.getName());
|
||||||
|
@ -364,9 +364,17 @@ command:
|
|||||||
totalWorkers: ' &7Dolgozók: &e[amount]'
|
totalWorkers: ' &7Dolgozók: &e[amount]'
|
||||||
penalty: ' &4Büntetés: &c[amount]%'
|
penalty: ' &4Büntetés: &c[amount]%'
|
||||||
bonus: ' &2Bónusz: &a[amount]%'
|
bonus: ' &2Bónusz: &a[amount]%'
|
||||||
newHeader: '&2========== [amount] ELÉRHETŐ MUNKÁK ========='
|
newHeader: '&2========== [amount] Elérhető munkák ========='
|
||||||
|
description: '[description]'
|
||||||
list: ' &8[place]. &7[jobname]'
|
list: ' &8[place]. &7[jobname]'
|
||||||
consoleList: ' &6[jobname]'
|
console:
|
||||||
|
newHeader: '&2========== [amount] Elérhető munkák ========='
|
||||||
|
description: '[description]'
|
||||||
|
totalWorkers: ' &7Dolgozók: &e[amount]'
|
||||||
|
penalty: ' &4Büntetés: &c[amount]%'
|
||||||
|
bonus: ' &2Bónusz: &a[amount]%'
|
||||||
|
list: ' &6[jobname]'
|
||||||
|
newMax: '&eMaximális szint: &f[max]'
|
||||||
click: '&bTovábbi információkért kattints a munkára!'
|
click: '&bTovábbi információkért kattints a munkára!'
|
||||||
detailed: '&bKattints ide a munka részleteinek mutatásához.'
|
detailed: '&bKattints ide a munka részleteinek mutatásához.'
|
||||||
jobHeader: '&2========== [jobname] ========='
|
jobHeader: '&2========== [jobname] ========='
|
||||||
|
Loading…
Reference in New Issue
Block a user