mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-26 00:35:17 +01:00
Permission to skip waypoint waiting time
This commit is contained in:
parent
441cea0208
commit
be82279540
@ -747,6 +747,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
||||
final int y = getPlayer().getLocation().getBlockY();
|
||||
final int z = getPlayer().getLocation().getBlockZ();
|
||||
final int warpTime = target.getWarpTime();
|
||||
final boolean hasPerm = getPlayer().hasPermission("mmocore.bypass-waypoint-wait");
|
||||
int t;
|
||||
|
||||
public void run() {
|
||||
@ -759,7 +760,7 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
|
||||
}
|
||||
|
||||
MMOCore.plugin.configManager.getSimpleMessage("warping-comencing", "left", String.valueOf((warpTime - t) / 20)).send(getPlayer());
|
||||
if (t++ >= warpTime) {
|
||||
if (hasPerm || t++ >= warpTime) {
|
||||
getPlayer().teleport(target.getLocation());
|
||||
getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 20, 1, false, false));
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.WARP_TELEPORT).playTo(getPlayer());
|
||||
|
@ -24,6 +24,9 @@ permissions:
|
||||
mmocore.currency:
|
||||
description: Access to /deposit and /withdraw
|
||||
default: op
|
||||
mmocore.bypass-waypoint-wait:
|
||||
description: Bypass waypoint waiting time
|
||||
default: op
|
||||
mmocore.class-select:
|
||||
description: Access to /class
|
||||
default: op
|
||||
|
Loading…
Reference in New Issue
Block a user