mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Fixed /jobs browse not works in console
- Some changes in version checking message - CROPS changed to WHEAT for default (No version update in plugin.yml because of the check)
This commit is contained in:
parent
67f7ea97c4
commit
804933a294
@ -82,9 +82,9 @@ public class browse implements Cmd {
|
||||
|
||||
String hoverMsg = "";
|
||||
|
||||
if (!one.getDescription().isEmpty()) {
|
||||
if (!one.getDescription().isEmpty())
|
||||
hoverMsg += one.getDescription().replace("/n", "");
|
||||
}
|
||||
|
||||
if (one.getMaxLevel(sender) > 0) {
|
||||
if (!hoverMsg.isEmpty())
|
||||
hoverMsg += " \n";
|
||||
@ -121,15 +121,12 @@ public class browse implements Cmd {
|
||||
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.jobHeader", "[jobname]", j.getName()));
|
||||
|
||||
if (j.getMaxLevel(sender) > 0) {
|
||||
if (j.getMaxLevel(sender) > 0)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.info.help.newMax", "[max]", j.getMaxLevel(sender)));
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().ShowTotalWorkers) {
|
||||
if (Jobs.getGCManager().ShowTotalWorkers)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.totalWorkers", "[amount]", j.getTotalPlayers()));
|
||||
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().useDynamicPayment && Jobs.getGCManager().ShowPenaltyBonus) {
|
||||
if ((int) (j.getBonus() * 100) < 0)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.penalty", "[amount]", (int) (j.getBonus() * 100) * -1));
|
||||
@ -157,19 +154,51 @@ public class browse implements Cmd {
|
||||
} else {
|
||||
if (j == null) {
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.newHeader", "[amount]", jobList.size()));
|
||||
} else {
|
||||
for (Job one : jobList) {
|
||||
|
||||
String msg = "";
|
||||
|
||||
if (!one.getDescription().isEmpty())
|
||||
msg += one.getDescription().replace("/n", "");
|
||||
|
||||
if (one.getMaxLevel(sender) > 0) {
|
||||
if (!msg.isEmpty())
|
||||
msg += " \n";
|
||||
msg += Jobs.getLanguage().getMessage("command.info.help.newMax", "[max]", one.getMaxLevel(sender));
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().ShowTotalWorkers) {
|
||||
if (!msg.isEmpty())
|
||||
msg += " \n";
|
||||
msg += Jobs.getLanguage().getMessage("command.browse.output.totalWorkers", "[amount]", one.getTotalPlayers());
|
||||
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().useDynamicPayment && Jobs.getGCManager().ShowPenaltyBonus) {
|
||||
if (!msg.isEmpty())
|
||||
msg += " \n";
|
||||
if ((int) (one.getBonus() * 100) < 0)
|
||||
msg += Jobs.getLanguage().getMessage("command.browse.output.penalty", "[amount]", (int) (one.getBonus() * 100) * -1);
|
||||
else
|
||||
msg += Jobs.getLanguage().getMessage("command.browse.output.bonus", "[amount]", (int) (one.getBonus() * 100));
|
||||
}
|
||||
|
||||
if (!msg.isEmpty())
|
||||
msg += " \n";
|
||||
msg += Jobs.getLanguage().getMessage("command.browse.output.consoleList", "[jobname]", one.getName());
|
||||
|
||||
sender.sendMessage(msg);
|
||||
}
|
||||
} else {
|
||||
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.jobHeader", "[jobname]", j.getName()));
|
||||
|
||||
if (j.getMaxLevel(sender) > 0) {
|
||||
if (j.getMaxLevel(sender) > 0)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.info.help.newMax", "[max]", j.getMaxLevel(sender)));
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().ShowTotalWorkers) {
|
||||
if (Jobs.getGCManager().ShowTotalWorkers)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.totalWorkers", "[amount]", j.getTotalPlayers()));
|
||||
|
||||
}
|
||||
|
||||
if (Jobs.getGCManager().useDynamicPayment && Jobs.getGCManager().ShowPenaltyBonus) {
|
||||
if ((int) (j.getBonus() * 100) < 0)
|
||||
sender.sendMessage(Jobs.getLanguage().getMessage("command.browse.output.penalty", "[amount]", (int) (j.getBonus() * 100) * -1));
|
||||
|
@ -432,6 +432,7 @@ public class LanguageManager {
|
||||
|
||||
c.get("command.browse.output.newHeader", "&2========== [amount] Available Jobs =========");
|
||||
c.get("command.browse.output.list", " &8[place]. &7[jobname]");
|
||||
c.get("command.browse.output.consoleList", " &6[jobname]");
|
||||
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");
|
||||
|
||||
|
@ -8,7 +8,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
@ -135,13 +134,14 @@ public class VersionChecker {
|
||||
if (newVersion == null || newVersion.equalsIgnoreCase(currentVersion))
|
||||
return;
|
||||
List<String> msg = Arrays.asList(
|
||||
ChatColor.GREEN + "*********************** " + plugin.getDescription().getName() + " **************************",
|
||||
ChatColor.GREEN + "* " + newVersion + " is now available! Your version: " + currentVersion,
|
||||
ChatColor.GREEN + "* " + ChatColor.DARK_GREEN + plugin.getDescription().getWebsite(),
|
||||
ChatColor.GREEN + "************************************************************");
|
||||
"&a*********************** &e" + plugin.getDescription().getName() + "&a **************************",
|
||||
"&a* &e" + newVersion + " is now available! Your version: &e" + currentVersion,
|
||||
"&a* &2" + plugin.getDescription().getWebsite(),
|
||||
"&a* Or get the dev. builds from &2https://github.com/Zrips/Jobs/releases",
|
||||
"&a************************************************************");
|
||||
for (String one : msg)
|
||||
if (player != null)
|
||||
player.sendMessage(one);
|
||||
player.sendMessage(org.bukkit.ChatColor.translateAlternateColorCodes('&', one));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1287,7 +1287,7 @@ Jobs:
|
||||
income: 1.5
|
||||
points: 1.5
|
||||
experience: 3.0
|
||||
CROPS-7:
|
||||
WHEAT-7:
|
||||
income: 1.5
|
||||
points: 1.5
|
||||
experience: 3.0
|
||||
@ -1348,7 +1348,7 @@ Jobs:
|
||||
points: 1
|
||||
experience: 1.0
|
||||
Place:
|
||||
CROPS-0:
|
||||
WHEAT-0:
|
||||
income: 3.0
|
||||
points: 3
|
||||
experience: 3.0
|
||||
|
@ -282,7 +282,7 @@ command:
|
||||
info: '&eBarkácsol'
|
||||
none: '%jobname% nem kap pénzt, ha barkácsol.'
|
||||
drink:
|
||||
info: '&eMegiszik'
|
||||
info: '&eMegisz'
|
||||
none: '%jobname% nem kap pénzt, ha iszik.'
|
||||
smelt:
|
||||
info: '&eOlvaszt'
|
||||
@ -330,7 +330,7 @@ command:
|
||||
args: '[munkanév]'
|
||||
error:
|
||||
alreadyin: '&cMár csatlakoztál a(z) %jobname%&c munkához!'
|
||||
fullslots: '&cNem tudsz csatlakozni a(z) %jobname% munkához, mert nincsenek rendelkezésre álló helyek.'
|
||||
fullslots: '&cNem tudsz csatlakozni a(z) %jobname%&c munkához, mert nincsenek rendelkezésre álló helyek.'
|
||||
maxjobs: '&cMár túl sok munkát vállaltál.'
|
||||
rejoin: '&cNem csatlakozhatsz ebbe a munkába. Várj [time]'
|
||||
rejoin: '&aKattints ide, hogy újra csatlakozz ebbe a munkába: '
|
||||
@ -366,6 +366,7 @@ command:
|
||||
bonus: ' &2Bónusz: &a[amount]%'
|
||||
newHeader: '&2========== [amount] ELÉRHETŐ MUNKÁK ========='
|
||||
list: ' &8[place]. &7[jobname]'
|
||||
consoleList: ' &6[jobname]'
|
||||
click: '&bTovábbi információkért kattints a munkára!'
|
||||
detailed: '&bKattints ide a munka részleteinek mutatásához.'
|
||||
jobHeader: '&2========== [jobname] ========='
|
||||
@ -415,7 +416,7 @@ command:
|
||||
error:
|
||||
alreadyin: '&cA játékos már dolgozik %jobname% munkánál.'
|
||||
output:
|
||||
target: 'Most már a(z) %jobname% munkánál dolgozik.'
|
||||
target: '&aMost már a(z) %jobname%&a munkánál dolgozik.'
|
||||
top:
|
||||
help:
|
||||
info: 'Top %amount% játékosok a ranglistán.'
|
||||
|
Loading…
Reference in New Issue
Block a user