mirror of
https://github.com/Zrips/Jobs.git
synced 2025-03-12 14:49:37 +01:00
Add \n newline support for jobs description
This commit is contained in:
parent
92cbf5c9ad
commit
3fceed1beb
@ -100,7 +100,7 @@ public class GuiManager {
|
||||
else
|
||||
Lore.add(Jobs.getLanguage().getMessage("command.browse.output.bonus", "[amount]", (int) (job.getBonus() * 100)));
|
||||
|
||||
Lore.addAll(Arrays.asList(job.getDescription().split("/n")));
|
||||
Lore.addAll(Arrays.asList(job.getDescription().contains("/n") ? job.getDescription().split("/n") : job.getDescription().split("\n")));
|
||||
|
||||
if (job.getMaxSlots() != null)
|
||||
Lore.add(Jobs.getLanguage().getMessage("command.info.gui.leftSlots") + ((job.getMaxSlots() - Jobs.getUsedSlots(job)) > 0 ? (job.getMaxSlots() - Jobs
|
||||
|
@ -1134,7 +1134,6 @@ public class Jobs extends JavaPlugin {
|
||||
}
|
||||
|
||||
expiredJobs.forEach(j -> getPlayerManager().leaveJob(jPlayer, j));
|
||||
expiredJobs.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class GeneralConfigManager {
|
||||
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
||||
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
|
||||
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, UseInversedClickToLeave, ShowActionNames,
|
||||
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames,
|
||||
DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UseFlicker, UseTrail, UsePerPermissionForLeaving,
|
||||
EnableConfirmation, FilterHiddenPlayerFromTabComplete, jobsInfoOpensBrowse, MonsterDamageUse = false, useMaxPaymentCurve,
|
||||
hideJobsInfoWithoutPermission, UseTaxes, TransferToServerAccount, TakeFromPlayersPayment, AutoJobJoinUse, AllowDelevel,
|
||||
@ -944,10 +944,6 @@ public class GeneralConfigManager {
|
||||
c.addComment("JobsGUI.SwitcheButtons", "With true left mouse button will join job and right will show more info.",
|
||||
"With false left mouse button will show more info, right will join job or inversely.", "Don't forget to adjust locale file!");
|
||||
JobsGUISwitcheButtons = c.get("JobsGUI.SwitcheButtons", false);
|
||||
c.addComment("JobsGUI.UseInversedClickToLeave", "Do you want to use the left/right click button to leave from job?",
|
||||
"This option click type depend from SwitcheButtons option, if true using the left button and inversely.",
|
||||
"Don't forget to adjust locale file");
|
||||
UseInversedClickToLeave = c.get("JobsGUI.UseInversedClickToLeave", false);
|
||||
c.addComment("JobsGUI.DisableJoiningJobThroughGui", "Allows players to join a specified job via GUI.");
|
||||
DisableJoiningJobThroughGui = c.get("JobsGUI.DisableJoiningJobThroughGui", false);
|
||||
c.addComment("JobsGUI.ShowActionNames", "Do you want to show the action names in GUI?");
|
||||
|
@ -1707,7 +1707,7 @@ public abstract class JobsDAO {
|
||||
prest = conn.prepareStatement("SELECT * FROM `" + DBTables.UsersTable.getTableName() + "` WHERE `" + UserTableFields.player_uuid.getCollumn() + "` = ?;");
|
||||
prest.setString(1, uuid.toString());
|
||||
res = prest.executeQuery();
|
||||
if (res.next()) {
|
||||
while (res.next()) {
|
||||
pInfo = new PlayerInfo(
|
||||
res.getString(UserTableFields.username.getCollumn()),
|
||||
res.getInt("id"), uuid,
|
||||
@ -1763,8 +1763,6 @@ public abstract class JobsDAO {
|
||||
ps.execute();
|
||||
close(ps);
|
||||
}
|
||||
|
||||
uuids.clear();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user