mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-25 20:16:13 +01:00
Fix for boost command not reseting specific jobs
This commit is contained in:
parent
f8dfad2e2e
commit
0c38f6cc20
@ -76,7 +76,7 @@ public class boost implements Cmd {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (job != null && rate == null) {
|
||||
if (job != null && rate == null && !reset) {
|
||||
LC.info_Spliter.sendMessage(sender);
|
||||
showBoosts(sender, job);
|
||||
return true;
|
||||
@ -108,10 +108,10 @@ public class boost implements Cmd {
|
||||
for (CurrencyType curr : CurrencyType.values()) {
|
||||
job.addBoost(curr, 0);
|
||||
}
|
||||
Language.sendMessage(sender, "command.moneyboost.output.jobsboostreset", "%jobname%", job.getName());
|
||||
Language.sendMessage(sender, "command.boost.output.jobsboostreset", "%jobname%", job.getName());
|
||||
} else {
|
||||
job.addBoost(type, 0);
|
||||
Language.sendMessage(sender, "command.moneyboost.output.jobstypeboostreset", "%jobname%", job.getName(), "%type%", type.getDisplayName());
|
||||
Language.sendMessage(sender, "command.boost.output.jobstypeboostreset", "%jobname%", job.getName(), "%type%", type.getDisplayName());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -8,6 +8,7 @@ import java.util.List;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
import com.gamingmesh.jobs.container.CurrencyType;
|
||||
import com.gamingmesh.jobs.i18n.Language;
|
||||
import com.gamingmesh.jobs.stuff.Util;
|
||||
|
||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||
@ -137,7 +138,10 @@ public class LanguageManager {
|
||||
c.get("command.boost.output.boostadded", "&aBoost of &e%boost% &aadded for &e%jobname%!");
|
||||
c.get("command.boost.output.infostats", "&c-----> &a%type% rate x%boost% enabled&c <-------");
|
||||
c.get("command.boost.output.boostStats", "&6%payments% &e%jobname%");
|
||||
|
||||
|
||||
c.get("command.boost.output.jobsboostreset", "&aBoost of &e%boost% &aadded for &e%jobname%!");
|
||||
c.get("command.boost.output.jobstypeboostreset", "&aBoost of &e%boost% &aadded for &e%jobname%!");
|
||||
|
||||
c.get("command.schedule.help.info", "Enables the given scheduler");
|
||||
c.get("command.schedule.help.args", "enable [scheduleName] [untilTime]");
|
||||
Jobs.getGCManager().getCommandArgs().put("schedule", Arrays.asList("enable", "[scheduleName]", "[untilTime]"));
|
||||
|
@ -5,8 +5,6 @@ import java.util.List;
|
||||
|
||||
import com.gamingmesh.jobs.Jobs;
|
||||
|
||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||
|
||||
public class ExploreChunk {
|
||||
|
||||
private List<Integer> playerIds = new ArrayList<>();
|
||||
|
@ -43,12 +43,13 @@ import com.gamingmesh.jobs.dao.JobsManager.DataBaseType;
|
||||
import com.gamingmesh.jobs.economy.PaymentData;
|
||||
import com.gamingmesh.jobs.stuff.Util;
|
||||
|
||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||
import net.Zrips.CMILib.Messages.CMIMessages;
|
||||
import net.Zrips.CMILib.Time.CMITimeManager;
|
||||
import net.Zrips.CMILib.Version.Schedulers.CMIScheduler;
|
||||
|
||||
public abstract class JobsDAO {
|
||||
|
||||
|
||||
private JobsConnectionPool pool;
|
||||
private static String prefix;
|
||||
private Jobs plugin;
|
||||
@ -2563,12 +2564,14 @@ public abstract class JobsDAO {
|
||||
ExploreChunk chunk = oneChunk.getValue();
|
||||
if (chunk.getDbId() != -1)
|
||||
continue;
|
||||
|
||||
prest2.setInt(1, id);
|
||||
prest2.setInt(2, region.getValue().getChunkGlobalX(oneChunk.getKey()));
|
||||
prest2.setInt(3, region.getValue().getChunkGlobalZ(oneChunk.getKey()));
|
||||
prest2.setString(4, chunk.serializeNames());
|
||||
prest2.setString(5, jobsWorld != null ? jobsWorld.getName() : "");
|
||||
prest2.addBatch();
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -2625,7 +2628,7 @@ public abstract class JobsDAO {
|
||||
conn.setAutoCommit(true);
|
||||
|
||||
if (i > 0)
|
||||
CMIMessages.consoleMessage("&e[Jobs] Updated " + i + " explorer entries.");
|
||||
CMIMessages.consoleMessage("&e[Jobs] Updated " + i + " explorer entries.");
|
||||
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user