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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (job != null && rate == null) {
|
if (job != null && rate == null && !reset) {
|
||||||
LC.info_Spliter.sendMessage(sender);
|
LC.info_Spliter.sendMessage(sender);
|
||||||
showBoosts(sender, job);
|
showBoosts(sender, job);
|
||||||
return true;
|
return true;
|
||||||
@ -108,10 +108,10 @@ public class boost implements Cmd {
|
|||||||
for (CurrencyType curr : CurrencyType.values()) {
|
for (CurrencyType curr : CurrencyType.values()) {
|
||||||
job.addBoost(curr, 0);
|
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 {
|
} else {
|
||||||
job.addBoost(type, 0);
|
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;
|
return true;
|
||||||
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.gamingmesh.jobs.Jobs;
|
import com.gamingmesh.jobs.Jobs;
|
||||||
import com.gamingmesh.jobs.container.CurrencyType;
|
import com.gamingmesh.jobs.container.CurrencyType;
|
||||||
|
import com.gamingmesh.jobs.i18n.Language;
|
||||||
import com.gamingmesh.jobs.stuff.Util;
|
import com.gamingmesh.jobs.stuff.Util;
|
||||||
|
|
||||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||||
@ -138,6 +139,9 @@ public class LanguageManager {
|
|||||||
c.get("command.boost.output.infostats", "&c-----> &a%type% rate x%boost% enabled&c <-------");
|
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.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.info", "Enables the given scheduler");
|
||||||
c.get("command.schedule.help.args", "enable [scheduleName] [untilTime]");
|
c.get("command.schedule.help.args", "enable [scheduleName] [untilTime]");
|
||||||
Jobs.getGCManager().getCommandArgs().put("schedule", Arrays.asList("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 com.gamingmesh.jobs.Jobs;
|
||||||
|
|
||||||
import net.Zrips.CMILib.Logs.CMIDebug;
|
|
||||||
|
|
||||||
public class ExploreChunk {
|
public class ExploreChunk {
|
||||||
|
|
||||||
private List<Integer> playerIds = new ArrayList<>();
|
private List<Integer> playerIds = new ArrayList<>();
|
||||||
|
@ -43,6 +43,7 @@ import com.gamingmesh.jobs.dao.JobsManager.DataBaseType;
|
|||||||
import com.gamingmesh.jobs.economy.PaymentData;
|
import com.gamingmesh.jobs.economy.PaymentData;
|
||||||
import com.gamingmesh.jobs.stuff.Util;
|
import com.gamingmesh.jobs.stuff.Util;
|
||||||
|
|
||||||
|
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||||
import net.Zrips.CMILib.Messages.CMIMessages;
|
import net.Zrips.CMILib.Messages.CMIMessages;
|
||||||
import net.Zrips.CMILib.Time.CMITimeManager;
|
import net.Zrips.CMILib.Time.CMITimeManager;
|
||||||
import net.Zrips.CMILib.Version.Schedulers.CMIScheduler;
|
import net.Zrips.CMILib.Version.Schedulers.CMIScheduler;
|
||||||
@ -2563,12 +2564,14 @@ public abstract class JobsDAO {
|
|||||||
ExploreChunk chunk = oneChunk.getValue();
|
ExploreChunk chunk = oneChunk.getValue();
|
||||||
if (chunk.getDbId() != -1)
|
if (chunk.getDbId() != -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
prest2.setInt(1, id);
|
prest2.setInt(1, id);
|
||||||
prest2.setInt(2, region.getValue().getChunkGlobalX(oneChunk.getKey()));
|
prest2.setInt(2, region.getValue().getChunkGlobalX(oneChunk.getKey()));
|
||||||
prest2.setInt(3, region.getValue().getChunkGlobalZ(oneChunk.getKey()));
|
prest2.setInt(3, region.getValue().getChunkGlobalZ(oneChunk.getKey()));
|
||||||
prest2.setString(4, chunk.serializeNames());
|
prest2.setString(4, chunk.serializeNames());
|
||||||
prest2.setString(5, jobsWorld != null ? jobsWorld.getName() : "");
|
prest2.setString(5, jobsWorld != null ? jobsWorld.getName() : "");
|
||||||
prest2.addBatch();
|
prest2.addBatch();
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user