Cancel tpbanner command if banners are disabled.
This commit is contained in:
parent
cfb64ea316
commit
410e932826
@ -24,14 +24,19 @@ public class CmdTpBanner extends FCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void perform() {
|
public void perform() {
|
||||||
|
if (!P.p.getConfig().getBoolean("fbanners.Enabled")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
final FactionsPlayerListener fpl = new FactionsPlayerListener(P.p);
|
final FactionsPlayerListener fpl = new FactionsPlayerListener(P.p);
|
||||||
|
|
||||||
if (fpl.bannerLocations.containsKey(fme.getTag())) {
|
if (FactionsPlayerListener.bannerLocations.containsKey(fme.getTag())) {
|
||||||
fme.msg(TL.COMMAND_TPBANNER_SUCCESS);
|
fme.msg(TL.COMMAND_TPBANNER_SUCCESS);
|
||||||
this.doWarmUp(WarmUpUtil.Warmup.BANNER, TL.WARMUPS_NOTIFY_TELEPORT, "Banner", new Runnable() {
|
this.doWarmUp(WarmUpUtil.Warmup.BANNER, TL.WARMUPS_NOTIFY_TELEPORT, "Banner", new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
me.teleport(fpl.bannerLocations.get(fme.getTag()));
|
me.teleport(FactionsPlayerListener.bannerLocations.get(fme.getTag()));
|
||||||
}
|
}
|
||||||
}, this.p.getConfig().getLong("warmups.f-banner", 0));
|
}, this.p.getConfig().getLong("warmups.f-banner", 0));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user