Made F Stuck Toggleable
This commit is contained in:
parent
323dce1c4f
commit
606e82c890
@ -111,6 +111,7 @@ public class CmdDisband extends FCommand {
|
||||
} else {
|
||||
context.player.sendMessage(String.valueOf(TL.COMMAND_DISBAND_PLAYER));
|
||||
}
|
||||
Bukkit.broadcastMessage("Called");
|
||||
faction.disband(context.player, PlayerDisbandReason.COMMAND);
|
||||
if (!context.fPlayer.canFlyAtLocation() && FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||
context.fPlayer.setFFlying(false, false);
|
||||
|
@ -21,6 +21,7 @@ public class CmdLeave extends FCommand {
|
||||
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
|
||||
context.fPlayer.leave(true);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,14 @@ public class CmdStuck extends FCommand {
|
||||
final long delay = FactionsPlugin.getInstance().getConfig().getLong("hcf.stuck.delay", 30);
|
||||
final int radius = FactionsPlugin.getInstance().getConfig().getInt("hcf.stuck.radius", 10);
|
||||
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("hcf.stuck.Enabled", false)) {
|
||||
context.msg(TL.GENERIC_DISABLED, "Factions Stuck");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (FactionsPlugin.getInstance().getStuckMap().containsKey(player.getUniqueId())) {
|
||||
long wait = FactionsPlugin.getInstance().getTimers().get(player.getUniqueId()) - System.currentTimeMillis();
|
||||
String time = DurationFormatUtils.formatDuration(wait, TL.COMMAND_STUCK_TIMEFORMAT.toString(), true);
|
||||
|
@ -820,7 +820,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
Material type;
|
||||
if (event.getItem() != null) {
|
||||
// Convert 1.8 Material Names -> 1.14
|
||||
// Convert 1.8 Material Names -> 1.15
|
||||
type = XMaterial.matchXMaterial(event.getItem().getType().toString()).get().parseMaterial();
|
||||
} else {
|
||||
type = null;
|
||||
|
@ -260,6 +260,7 @@ hcf:
|
||||
buffer-zone: 0
|
||||
|
||||
stuck:
|
||||
Enabled: false
|
||||
delay: 30
|
||||
radius: 10
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user