mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 12:05:16 +01:00
Added option to leave from job in jobs GUI
This commit is contained in:
parent
5d856f0fbc
commit
1513e32afc
@ -17,3 +17,6 @@
|
|||||||
- Fix bone meals dupping issue when interacted with seeds
|
- Fix bone meals dupping issue when interacted with seeds
|
||||||
- Should fixed issue when the JobsPrePaymentEvent getJob method always returns null
|
- Should fixed issue when the JobsPrePaymentEvent getJob method always returns null
|
||||||
- Fixed income dupping issue and repair action not work correctly.
|
- Fixed income dupping issue and repair action not work correctly.
|
||||||
|
- Updated translations to the latest
|
||||||
|
- Jobs toggles will not be saved from now instantly when get income
|
||||||
|
- Added option to leave from job in jobs GUI.
|
||||||
|
2
pom.xml
2
pom.xml
@ -124,7 +124,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.clip</groupId>
|
<groupId>me.clip</groupId>
|
||||||
<artifactId>placeholderapi</artifactId>
|
<artifactId>placeholderapi</artifactId>
|
||||||
<version>2.10.3</version>
|
<version>2.10.4</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
@ -105,7 +105,7 @@ public class GeneralConfigManager {
|
|||||||
public boolean fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
public boolean fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
||||||
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
|
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
|
||||||
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||||
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames;
|
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, UseInversedClickToLeave, ShowActionNames;
|
||||||
|
|
||||||
public boolean FireworkLevelupUse, UseRandom, UseFlicker, UseTrail;
|
public boolean FireworkLevelupUse, UseRandom, UseFlicker, UseTrail;
|
||||||
public String FireworkType;
|
public String FireworkType;
|
||||||
@ -969,9 +969,13 @@ public class GeneralConfigManager {
|
|||||||
JobsGUIOpenOnBrowse = c.get("JobsGUI.OpenOnBrowse", true);
|
JobsGUIOpenOnBrowse = c.get("JobsGUI.OpenOnBrowse", true);
|
||||||
c.addComment("JobsGUI.ShowChatBrowse", "Do you want to show chat information when performing /jobs browse command?");
|
c.addComment("JobsGUI.ShowChatBrowse", "Do you want to show chat information when performing /jobs browse command?");
|
||||||
JobsGUIShowChatBrowse = c.get("JobsGUI.ShowChatBrowse", true);
|
JobsGUIShowChatBrowse = c.get("JobsGUI.ShowChatBrowse", true);
|
||||||
c.addComment("JobsGUI.SwitcheButtons", "With true left mouse button will join job and right will show more info",
|
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", "Don't forget to adjust locale file");
|
"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);
|
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.ShowActionNames", "Do you want to show the action names in GUI?");
|
c.addComment("JobsGUI.ShowActionNames", "Do you want to show the action names in GUI?");
|
||||||
ShowActionNames = c.get("JobsGUI.ShowActionNames", true);
|
ShowActionNames = c.get("JobsGUI.ShowActionNames", true);
|
||||||
c.addComment("JobsGUI.Rows", "Defines size in rows of GUI");
|
c.addComment("JobsGUI.Rows", "Defines size in rows of GUI");
|
||||||
|
@ -265,7 +265,11 @@ public class JobsListener implements Listener {
|
|||||||
Jobs.getGCManager().JobsGUISwitcheButtons && event.getClick() == ClickType.LEFT) {
|
Jobs.getGCManager().JobsGUISwitcheButtons && event.getClick() == ClickType.LEFT) {
|
||||||
Job job = Jobs.getGUIManager().getJobBySlot(player, slot);
|
Job job = Jobs.getGUIManager().getJobBySlot(player, slot);
|
||||||
if (job != null) {
|
if (job != null) {
|
||||||
Bukkit.dispatchCommand(player, "jobs join " + job.getName());
|
if (Jobs.getGCManager().UseInversedClickToLeave && Jobs.getPlayerManager().getJobsPlayer(player).isInJob(job)) {
|
||||||
|
Bukkit.dispatchCommand(player, "jobs leave " + job.getName());
|
||||||
|
} else {
|
||||||
|
Bukkit.dispatchCommand(player, "jobs join " + job.getName());
|
||||||
|
}
|
||||||
player.getOpenInventory().getTopInventory().setContents(Jobs.getGUIManager().CreateJobsGUI(player).getContents());
|
player.getOpenInventory().getTopInventory().setContents(Jobs.getGUIManager().CreateJobsGUI(player).getContents());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user