mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
Bamboo stripping support
This commit is contained in:
parent
46a244417b
commit
157238b01e
@ -2,7 +2,6 @@ package com.gamingmesh.jobs.commands.list;
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -12,6 +11,7 @@ import com.gamingmesh.jobs.container.JobProgression;
|
|||||||
import com.gamingmesh.jobs.container.JobsPlayer;
|
import com.gamingmesh.jobs.container.JobsPlayer;
|
||||||
import com.gamingmesh.jobs.i18n.Language;
|
import com.gamingmesh.jobs.i18n.Language;
|
||||||
|
|
||||||
|
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||||
import net.Zrips.CMILib.RawMessages.RawMessage;
|
import net.Zrips.CMILib.RawMessages.RawMessage;
|
||||||
|
|
||||||
public class archive implements Cmd {
|
public class archive implements Cmd {
|
||||||
@ -45,12 +45,12 @@ public class archive implements Cmd {
|
|||||||
for (JobProgression jobInfo : allJobs) {
|
for (JobProgression jobInfo : allJobs) {
|
||||||
RawMessage rm = new RawMessage();
|
RawMessage rm = new RawMessage();
|
||||||
if (jobInfo.canRejoin())
|
if (jobInfo.canRejoin())
|
||||||
rm.addText(ChatColor.GREEN + "+" + Jobs.getCommandManager().jobStatsMessageArchive(jPlayer, jobInfo))
|
rm.addText(CMIChatColor.GREEN + "+" + Jobs.getCommandManager().jobStatsMessageArchive(jPlayer, jobInfo))
|
||||||
.addHover(Jobs.getLanguage().getMessage("command.join.rejoin")).addCommand("jobs join " + jobInfo.getJob().getName());
|
.addHover(Jobs.getLanguage().getMessage("command.join.rejoin"))
|
||||||
|
.addCommand("jobs join " + jobInfo.getJob().getName());
|
||||||
else
|
else
|
||||||
rm.addText(ChatColor.RED + "-" + Jobs.getCommandManager().jobStatsMessageArchive(jPlayer, jobInfo))
|
rm.addText(CMIChatColor.RED + "-" + Jobs.getCommandManager().jobStatsMessageArchive(jPlayer, jobInfo))
|
||||||
.addHover(Jobs.getLanguage().getMessage("command.join.error.rejoin", "[time]", jobInfo
|
.addHover(Jobs.getLanguage().getMessage("command.join.error.rejoin", "[time]", jobInfo.getRejoinTimeMessage()));
|
||||||
.getRejoinTimeMessage()));
|
|
||||||
rm.show(sender);
|
rm.show(sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1841,8 +1841,12 @@ public final class JobsPaymentListener implements Listener {
|
|||||||
|
|
||||||
// either it's version 1.13+ and we're trying to strip a normal log like oak,
|
// either it's version 1.13+ and we're trying to strip a normal log like oak,
|
||||||
// or it's 1.16+ and we're trying to strip a fungi like warped stem
|
// or it's 1.16+ and we're trying to strip a fungi like warped stem
|
||||||
if ((Version.isCurrentEqualOrHigher(Version.v1_13_R1) && (block.getType().toString().endsWith("_LOG") || block.getType().toString().endsWith("_WOOD"))) ||
|
|
||||||
(Version.isCurrentEqualOrHigher(Version.v1_16_R1) && (block.getType().toString().endsWith("_STEM") || block.getType().toString().endsWith("_HYPHAE")))) {
|
String type = block.getType().toString();
|
||||||
|
|
||||||
|
if ((Version.isCurrentEqualOrHigher(Version.v1_13_R1) && (type.endsWith("_LOG") || type.endsWith("_WOOD"))) ||
|
||||||
|
(Version.isCurrentEqualOrHigher(Version.v1_16_R1) && (type.endsWith("_STEM") || type.endsWith("_HYPHAE"))) ||
|
||||||
|
(Version.isCurrentEqualOrHigher(Version.v1_20_R1) && (type.equalsIgnoreCase("BAMBOO_BLOCK")))) {
|
||||||
CMIScheduler.get().runTaskLater(() -> Jobs.action(jPlayer, new BlockActionInfo(block, ActionType.STRIPLOGS), block), 1);
|
CMIScheduler.get().runTaskLater(() -> Jobs.action(jPlayer, new BlockActionInfo(block, ActionType.STRIPLOGS), block), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user