mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
Fix bot (#705)
* refactor: refactor bot * fix: fix use * fix: fix use * fix: fix
This commit is contained in:
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemAction extends TimerBotAction<UseItemAction> {
|
public interface UseItemAction extends TimerBotAction<UseItemAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemAction setUseTick(int useTick);
|
UseItemAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemAction create() {
|
static UseItemAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemAction.class);
|
return Bukkit.getBotManager().newAction(UseItemAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemAutoAction extends TimerBotAction<UseItemAutoAction> {
|
public interface UseItemAutoAction extends TimerBotAction<UseItemAutoAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemAutoAction setUseTick(int useTick);
|
UseItemAutoAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemAutoAction create() {
|
static UseItemAutoAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemAutoAction.class);
|
return Bukkit.getBotManager().newAction(UseItemAutoAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemOffhandAction extends TimerBotAction<UseItemOffhandAction> {
|
public interface UseItemOffhandAction extends TimerBotAction<UseItemOffhandAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemOffhandAction setUseTick(int useTick);
|
UseItemOffhandAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemOffhandAction create() {
|
static UseItemOffhandAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemOffhandAction.class);
|
return Bukkit.getBotManager().newAction(UseItemOffhandAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemOnAction extends TimerBotAction<UseItemOnAction> {
|
public interface UseItemOnAction extends TimerBotAction<UseItemOnAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemOnAction setUseTick(int useTick);
|
UseItemOnAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemOnAction create() {
|
static UseItemOnAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemOnAction.class);
|
return Bukkit.getBotManager().newAction(UseItemOnAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemOnOffhandAction extends TimerBotAction<UseItemOnOffhandAction> {
|
public interface UseItemOnOffhandAction extends TimerBotAction<UseItemOnOffhandAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemOnOffhandAction setUseTick(int useTick);
|
UseItemOnOffhandAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemOnOffhandAction create() {
|
static UseItemOnOffhandAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemOnOffhandAction.class);
|
return Bukkit.getBotManager().newAction(UseItemOnOffhandAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemToAction extends TimerBotAction<UseItemToAction> {
|
public interface UseItemToAction extends TimerBotAction<UseItemToAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemToAction setUseTick(int useTick);
|
UseItemToAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemToAction create() {
|
static UseItemToAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemToAction.class);
|
return Bukkit.getBotManager().newAction(UseItemToAction.class);
|
||||||
|
|||||||
@@ -8,20 +8,20 @@ import org.bukkit.Bukkit;
|
|||||||
public interface UseItemToOffhandAction extends TimerBotAction<UseItemToOffhandAction> {
|
public interface UseItemToOffhandAction extends TimerBotAction<UseItemToOffhandAction> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the equivalent right-click hold duration in ticks.
|
* Gets the equivalent right-click hold duration timeout in ticks.
|
||||||
* Default is -1, which means will not be released.
|
* Default is -1, which means no timeout.
|
||||||
*
|
*
|
||||||
* @return the equivalent right-click hold duration
|
* @return the equivalent right-click hold duration timeout
|
||||||
*/
|
*/
|
||||||
int getUseTick();
|
int getUseTickTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the equivalent right-click hold duration in ticks.
|
* Sets the equivalent right-click hold duration timeout in ticks.
|
||||||
*
|
*
|
||||||
* @param useTick the equivalent right-click hold duration
|
* @param timeout the equivalent right-click hold duration timeout
|
||||||
* @return this action instance
|
* @return this action instance
|
||||||
*/
|
*/
|
||||||
UseItemToOffhandAction setUseTick(int useTick);
|
UseItemToOffhandAction setUseTickTimeout(int timeout);
|
||||||
|
|
||||||
static UseItemToOffhandAction create() {
|
static UseItemToOffhandAction create() {
|
||||||
return Bukkit.getBotManager().newAction(UseItemToOffhandAction.class);
|
return Bukkit.getBotManager().newAction(UseItemToOffhandAction.class);
|
||||||
|
|||||||
@@ -225,23 +225,11 @@ public abstract class ServerBotAction<E extends ServerBotAction<E>> {
|
|||||||
this.onFail = onFail;
|
this.onFail = onFail;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Consumer<E> getOnFail() {
|
|
||||||
return onFail;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnSuccess(Consumer<E> onSuccess) {
|
public void setOnSuccess(Consumer<E> onSuccess) {
|
||||||
this.onSuccess = onSuccess;
|
this.onSuccess = onSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Consumer<E> getOnSuccess() {
|
|
||||||
return onSuccess;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOnStop(Consumer<E> onStop) {
|
public void setOnStop(Consumer<E> onStop) {
|
||||||
this.onStop = onStop;
|
this.onStop = onStop;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Consumer<E> getOnStop() {
|
|
||||||
return onStop;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,19 +15,19 @@ import java.util.List;
|
|||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public abstract class ServerUseBotAction<T extends ServerUseBotAction<T>> extends ServerTimerBotAction<T> {
|
public abstract class ServerUseBotAction<T extends ServerUseBotAction<T>> extends ServerTimerBotAction<T> {
|
||||||
private int useTick = -1;
|
private int useTickTimeout = -1;
|
||||||
private int alreadyUsedTick = 0;
|
private int alreadyUsedTick = 0;
|
||||||
private int useItemRemainingTicks = 0;
|
private int useItemRemainingTicks = 0;
|
||||||
|
|
||||||
public ServerUseBotAction(String name, Supplier<T> supplier) {
|
public ServerUseBotAction(String name, Supplier<T> supplier) {
|
||||||
super(name, CommandArgument.of(CommandArgumentType.INTEGER, CommandArgumentType.INTEGER, CommandArgumentType.INTEGER, CommandArgumentType.INTEGER), supplier);
|
super(name, CommandArgument.of(CommandArgumentType.INTEGER, CommandArgumentType.INTEGER, CommandArgumentType.INTEGER, CommandArgumentType.INTEGER), supplier);
|
||||||
this.setSuggestion(3, Pair.of(List.of("-1"), "[UseTick]"));
|
this.setSuggestion(3, Pair.of(List.of("-1"), "[UseTickTimeout]"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadCommand(ServerPlayer player, @NotNull CommandArgumentResult result) {
|
public void loadCommand(ServerPlayer player, @NotNull CommandArgumentResult result) {
|
||||||
super.loadCommand(player, result);
|
super.loadCommand(player, result);
|
||||||
this.useTick = result.readInt(-1);
|
this.useTickTimeout = result.readInt(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -73,7 +73,7 @@ public abstract class ServerUseBotAction<T extends ServerUseBotAction<T>> extend
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isUseTickLimitExceeded() {
|
private boolean isUseTickLimitExceeded() {
|
||||||
int useTickLimit = useTick == -1 ? Integer.MAX_VALUE : useTick;
|
int useTickLimit = useTickTimeout == -1 ? Integer.MAX_VALUE : useTickTimeout;
|
||||||
return alreadyUsedTick > useTickLimit;
|
return alreadyUsedTick > useTickLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ public abstract class ServerUseBotAction<T extends ServerUseBotAction<T>> extend
|
|||||||
@NotNull
|
@NotNull
|
||||||
public CompoundTag save(@NotNull CompoundTag nbt) {
|
public CompoundTag save(@NotNull CompoundTag nbt) {
|
||||||
super.save(nbt);
|
super.save(nbt);
|
||||||
nbt.putInt("useTick", this.useTick);
|
nbt.putInt("useTick", this.useTickTimeout);
|
||||||
nbt.putInt("alreadyUsedTick", this.alreadyUsedTick);
|
nbt.putInt("alreadyUsedTick", this.alreadyUsedTick);
|
||||||
return nbt;
|
return nbt;
|
||||||
}
|
}
|
||||||
@@ -105,18 +105,18 @@ public abstract class ServerUseBotAction<T extends ServerUseBotAction<T>> extend
|
|||||||
@Override
|
@Override
|
||||||
public void load(@NotNull CompoundTag nbt) {
|
public void load(@NotNull CompoundTag nbt) {
|
||||||
super.load(nbt);
|
super.load(nbt);
|
||||||
this.useTick = nbt.getInt("useTick").orElseThrow();
|
this.useTickTimeout = nbt.getInt("useTick").orElseThrow();
|
||||||
this.alreadyUsedTick = nbt.getInt("alreadyUsedTick").orElseGet(
|
this.alreadyUsedTick = nbt.getInt("alreadyUsedTick").orElseGet(
|
||||||
() -> this.useTick - nbt.getInt("tickToRelease").orElseThrow()
|
() -> this.useTickTimeout - nbt.getInt("tickToRelease").orElseThrow()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return useTick;
|
return useTickTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUseTick(int useTick) {
|
public void setUseTickTimeout(int useTickTimeout) {
|
||||||
this.useTick = useTick;
|
this.useTickTimeout = useTickTimeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class ServerUseItemAction extends ServerUseBotAction<ServerUseItemAction>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static @NotNull InteractionResult useItem(@NotNull ServerBot bot, InteractionHand hand) {
|
public static @NotNull InteractionResult useItem(@NotNull ServerBot bot, InteractionHand hand) {
|
||||||
|
bot.updateItemInHand(hand);
|
||||||
InteractionResult result = bot.gameMode.useItem(bot, bot.level(), bot.getItemInHand(hand), hand);
|
InteractionResult result = bot.gameMode.useItem(bot, bot.level(), bot.getItemInHand(hand), hand);
|
||||||
if (shouldSwing(result)) {
|
if (shouldSwing(result)) {
|
||||||
bot.swing(hand);
|
bot.swing(hand);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class ServerUseItemOnAction extends ServerUseBotAction<ServerUseItemOnAct
|
|||||||
return InteractionResult.FAIL;
|
return InteractionResult.FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bot.updateItemInHand(hand);
|
||||||
InteractionResult interactionResult = bot.gameMode.useItemOn(bot, bot.level(), bot.getItemInHand(hand), hand, hitResult);
|
InteractionResult interactionResult = bot.gameMode.useItemOn(bot, bot.level(), bot.getItemInHand(hand), hand, hitResult);
|
||||||
if (shouldSwing(interactionResult)) {
|
if (shouldSwing(interactionResult)) {
|
||||||
bot.swing(hand);
|
bot.swing(hand);
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public class ServerUseItemToAction extends ServerUseBotAction<ServerUseItemToAct
|
|||||||
}
|
}
|
||||||
|
|
||||||
Vec3 vec3 = hitResult.getLocation().subtract(entity.getX(), entity.getY(), entity.getZ());
|
Vec3 vec3 = hitResult.getLocation().subtract(entity.getX(), entity.getY(), entity.getZ());
|
||||||
|
bot.updateItemInHand(hand);
|
||||||
InteractionResult interactionResult = entity.interactAt(bot, vec3, hand);
|
InteractionResult interactionResult = entity.interactAt(bot, vec3, hand);
|
||||||
if (!interactionResult.consumesAction()) {
|
if (!interactionResult.consumesAction()) {
|
||||||
interactionResult = bot.interactOn(hitResult.getEntity(), hand);
|
interactionResult = bot.interactOn(hitResult.getEntity(), hand);
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ public class CraftUseItemAction extends CraftTimerBotAction<UseItemAction, Serve
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemAction setUseTick(int useTick) {
|
public CraftUseItemAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemAutoAction extends CraftTimerBotAction<UseItemAutoActio
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemAutoAction setUseTick(int useTick) {
|
public CraftUseItemAutoAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemOffhandAction extends CraftTimerBotAction<UseItemOffhan
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemOffhandAction setUseTick(int useTick) {
|
public CraftUseItemOffhandAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemOnAction extends CraftTimerBotAction<UseItemOnAction, S
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemOnAction setUseTick(int useTick) {
|
public CraftUseItemOnAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemOnOffhandAction extends CraftTimerBotAction<UseItemOnOf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemOnOffhandAction setUseTick(int useTick) {
|
public CraftUseItemOnOffhandAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemToAction extends CraftTimerBotAction<UseItemToAction, S
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemToAction setUseTick(int useTick) {
|
public CraftUseItemToAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ public class CraftUseItemToOffhandAction extends CraftTimerBotAction<UseItemToOf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getUseTick() {
|
public int getUseTickTimeout() {
|
||||||
return serverAction.getUseTick();
|
return serverAction.getUseTickTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CraftUseItemToOffhandAction setUseTick(int useTick) {
|
public CraftUseItemToOffhandAction setUseTickTimeout(int timeout) {
|
||||||
serverAction.setUseTick(useTick);
|
serverAction.setUseTickTimeout(timeout);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user