mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
parent
a2bd1804d7
commit
4d05be6df9
@ -95,7 +95,7 @@ public class GeneralConfigManager {
|
||||
applyToNegativeIncome, useMinimumOveralPayment, useMinimumOveralPoints, useBreederFinder,
|
||||
CancelCowMilking, fixAtMaxLevel, TitleChangeChat, TitleChangeActionBar, LevelChangeChat,
|
||||
LevelChangeActionBar, SoundLevelupUse, SoundTitleChangeUse, UseServerAccount, EmptyServerAccountChat,
|
||||
EmptyServerAccountActionBar, ActionBarsMessageByDefault, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||
EmptyServerAccountActionBar, ActionBarsMessageByDefault, aBarSilentMode, ShowTotalWorkers, ShowPenaltyBonus, useDynamicPayment,
|
||||
JobsGUIOpenOnBrowse, JobsGUIShowChatBrowse, JobsGUISwitcheButtons, ShowActionNames,
|
||||
DisableJoiningJobThroughGui, FireworkLevelupUse, UseRandom, UseFlicker, UseTrail, UsePerPermissionForLeaving,
|
||||
EnableConfirmation, FilterHiddenPlayerFromTabComplete, jobsInfoOpensBrowse, MonsterDamageUse, useMaxPaymentCurve,
|
||||
@ -834,6 +834,8 @@ public class GeneralConfigManager {
|
||||
c.addComment("ActionBars.Messages.EnabledByDefault", "When this set to true player will see action bar messages by default",
|
||||
"When false, players will see chat messages instead.");
|
||||
ActionBarsMessageByDefault = c.get("ActionBars.Messages.EnabledByDefault", true);
|
||||
c.addComment("ActionBars.Messages.SilentMode", "If true, should we mute the payment messages from appearing in chat if actionbar is disabled?");
|
||||
aBarSilentMode = c.get("ActionBars.Messages.SilentMode", false);
|
||||
|
||||
if (Version.isCurrentEqualOrHigher(Version.v1_9_R1)) {
|
||||
c.addComment("BossBar.Enabled", "Enables BossBar feature", "Works only from 1.9 mc version");
|
||||
@ -965,9 +967,6 @@ public class GeneralConfigManager {
|
||||
tmat = CMIMaterial.get(c.get("JobsGUI.Filler.Material", "GREEN_STAINED_GLASS_PANE").toUpperCase());
|
||||
guiFiller = (tmat == null ? CMIMaterial.GREEN_STAINED_GLASS_PANE : tmat).newItemStack();
|
||||
|
||||
// c.addComment("Schedule.Boost.Enable", "Do you want to enable scheduler for global boost?");
|
||||
// useGlobalBoostScheduler = c.get("Schedule.Boost.Enable", false);
|
||||
|
||||
c.save();
|
||||
}
|
||||
|
||||
|
@ -135,15 +135,13 @@ public class JobsSQLite extends JobsDAO {
|
||||
@Override
|
||||
public boolean truncate(String table) {
|
||||
Statement statement = null;
|
||||
String query = null;
|
||||
try {
|
||||
if (!isTable(table)) {
|
||||
Jobs.consoleMsg("&cTable \"" + table + "\" does not exist.");
|
||||
return false;
|
||||
}
|
||||
statement = getConnection().createStatement();
|
||||
query = "DELETE FROM `" + table + "`;";
|
||||
statement.executeQuery(query);
|
||||
statement.executeQuery("DELETE FROM `" + table + "`;");
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
if (!(e.getMessage().toLowerCase().contains("locking") || e.getMessage().toLowerCase().contains("locked")) &&
|
||||
@ -158,15 +156,13 @@ public class JobsSQLite extends JobsDAO {
|
||||
@Override
|
||||
public boolean drop(String table) {
|
||||
Statement statement = null;
|
||||
String query = null;
|
||||
try {
|
||||
if (!isTable(table)) {
|
||||
Jobs.consoleMsg("&cTable \"" + table + "\" does not exist.");
|
||||
return false;
|
||||
}
|
||||
statement = getConnection().createStatement();
|
||||
query = "DROP TABLE IF EXISTS `" + table + "`;";
|
||||
statement.executeQuery(query);
|
||||
statement.executeQuery("DROP TABLE IF EXISTS `" + table + "`;");
|
||||
return true;
|
||||
} catch (SQLException e) {
|
||||
if (!(e.getMessage().toLowerCase().contains("locking") || e.getMessage().toLowerCase().contains("locked")) &&
|
||||
|
@ -64,16 +64,6 @@ public class BufferedEconomy {
|
||||
pay(new BufferedPayment(player.getPlayer(), payments));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Add payment to player's payment buffer
|
||||
// * @param player - player to be paid
|
||||
// * @param amount - amount to be paid
|
||||
// */
|
||||
// @Deprecated
|
||||
// public void pay(JobsPlayer player, double amount, double points, double exp) {
|
||||
// pay(new BufferedPayment(player.getPlayer(), amount, points, exp));
|
||||
// }
|
||||
|
||||
/**
|
||||
* Add payment to player's payment buffer
|
||||
* @param payment - payment to be paid
|
||||
@ -249,7 +239,8 @@ public class BufferedEconomy {
|
||||
* @param payment {@link BufferedPayment}
|
||||
*/
|
||||
public void showPayment(BufferedPayment payment) {
|
||||
if (payment.getOfflinePlayer() == null || !payment.getOfflinePlayer().isOnline() || !payment.containsPayment())
|
||||
if (payment.getOfflinePlayer() == null || !payment.getOfflinePlayer().isOnline() || !payment.containsPayment()
|
||||
|| Jobs.getGCManager().aBarSilentMode)
|
||||
return;
|
||||
|
||||
UUID playerUUID = payment.getOfflinePlayer().getUniqueId();
|
||||
|
Loading…
Reference in New Issue
Block a user