Cancel warmup on damage or movement
This commit is contained in:
@@ -50,7 +50,7 @@ public class CmdFWarp extends FCommand {
|
||||
if (!transact(fme)) {
|
||||
return;
|
||||
}
|
||||
this.doWarmUp(TL.WARMUPS_NOTIFY_TELEPORT, warpName, new Runnable() {
|
||||
this.doWarmUp(WarmUpUtil.Warmup.WARP, TL.WARMUPS_NOTIFY_TELEPORT, warpName, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
CmdFWarp.this.fme.getPlayer().teleport(CmdFWarp.this.myFaction.getWarp(warpName).getLocation());
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.massivecraft.factions.integration.Essentials;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.struct.Role;
|
||||
import com.massivecraft.factions.util.WarmUpUtil;
|
||||
import com.massivecraft.factions.zcore.util.SmokeUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Location;
|
||||
@@ -110,7 +111,7 @@ public class CmdHome extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
this.doWarmUp(TL.WARMUPS_NOTIFY_TELEPORT, "Home", new Runnable() {
|
||||
this.doWarmUp(WarmUpUtil.Warmup.HOME, TL.WARMUPS_NOTIFY_TELEPORT, "Home", new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Create a smoke effect
|
||||
|
||||
@@ -302,11 +302,11 @@ public abstract class FCommand extends MCommand<P> {
|
||||
}
|
||||
}
|
||||
|
||||
public void doWarmUp(TL translationKey, String action, Runnable runnable, long delay) {
|
||||
this.doWarmUp(this.fme, translationKey, action, runnable, delay);
|
||||
public void doWarmUp(WarmUpUtil.Warmup warmup, TL translationKey, String action, Runnable runnable, long delay) {
|
||||
this.doWarmUp(this.fme, warmup, translationKey, action, runnable, delay);
|
||||
}
|
||||
|
||||
public void doWarmUp(FPlayer player, TL translationKey, String action, Runnable runnable, long delay) {
|
||||
WarmUpUtil.process(player, translationKey, action, runnable, delay);
|
||||
public void doWarmUp(FPlayer player, WarmUpUtil.Warmup warmup, TL translationKey, String action, Runnable runnable, long delay) {
|
||||
WarmUpUtil.process(player, warmup, translationKey, action, runnable, delay);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user