public void setFrozen(boolean freeze) {
    cancel(unfreezeTask);
    unfreezeTask = null;
    freezeLocation = null;

    if (player.getGameMode() != GameMode.CREATIVE) {
      TFM_Util.setFlying(player, false);
    }

    if (!freeze) {
      return;
    }

    freezeLocation = player.getLocation(); // Blockify location
    TFM_Util.setFlying(player, true); // Avoid infinite falling

    unfreezeTask =
        new BukkitRunnable() {
          @Override
          public void run() {
            TFM_Util.adminAction("TotalFreedom", "Unfreezing " + player.getName(), false);
            setFrozen(false);
          }
        }.runTaskLater(TotalFreedomMod.plugin, AUTO_PURGE);
  }
  public void setMuted(boolean muted) {
    cancel(unmuteTask);
    unmuteTask = null;

    if (!muted) {
      return;
    }

    unmuteTask =
        new BukkitRunnable() {
          @Override
          public void run() {
            TFM_Util.adminAction("TotalFreedom", "Unmuting " + player.getName(), false);
            setMuted(false);
          }
        }.runTaskLater(TotalFreedomMod.plugin, AUTO_PURGE);
  }